assertEquals(expected, getOutput());
}
@Test
public void writeUnauthorizedClient() throws Exception {
OAuth2Exception oauthException = new UnauthorizedUserException(DETAILS);
String expected = createResponse(oauthException.getOAuth2ErrorCode());
converter.write(oauthException, contentType, outputMessage);
assertEquals(expected, getOutput());
}