@Test
public void testMaybeAppendAuthHeaderWithFullCredentials() throws URISyntaxException {

    Request request = mock(Request.class);
    URI uri = new URI("http://testuser:testpassword@127.0.0.1:8080/content");
    service.maybeAppendAuthHeader(uri, request);
    verify(request).header(HttpHeader.AUTHORIZATION,
            "Basic " + B64Code.encode("testuser:testpassword", StringUtil.__ISO_8859_1));
}