@Test
public void getEndpointInfo_testFailToInitEndpointOnConstructionWithBadResponse() throws Exception {

    mockCacheInitExpectations();
    when(httpResponseStatusLine.getStatusCode()).thenReturn(401); // get token response code
    gusTransport = createGusTransport();
    EndpointInfo ei = gusTransport.getEndpointInfo();
    assertEquals(DEFAULT_ENDPOINT, ei.getEndPoint());
    assertEquals(GusTransport.NO_TOKEN, ei.getToken());
    verify(httpClient, times(1)).execute(any());
    verify(httpResponse, times(1)).getStatusLine();
    verify(httpResponseStatusLine, times(1)).getStatusCode();
    verify(httpResponse, times(1)).getEntity();
}