}
public void testGetCredentialsGoodCredentials() throws RequiresHttpAction {
final BasicAuthClient basicAuthClient = getBasicAuthClient();
final String header = USERNAME + ":" + USERNAME;
final UsernamePasswordCredentials credentials = basicAuthClient.getCredentials(MockWebContext.create()
.addRequestHeader(HttpConstants.AUTHORIZATION_HEADER,
"Basic " + Base64.encodeBase64String(header.getBytes())));
assertEquals(USERNAME, credentials.getUsername());
assertEquals(USERNAME, credentials.getPassword());
}