@Test
public void testAuthentication() throws Exception {

    when(httpClientMock.newRequest("http://john:doe@example.org/")).thenReturn(requestMock);
    mockResponse(HttpStatus.OK_200);
    String result = HttpUtil.executeUrl("GET", "http://john:doe@example.org/", 500);
    assertEquals("Some content", result);
    verify(requestMock).header(HttpHeader.AUTHORIZATION, "Basic am9objpkb2U=");
}