1@Test
2public void
3 givenUserExists_whenUserInformationIsRetrieved_thenRetrievedResourceIsCorrect()
4 throws ClientProtocolException, IOException {
5
6 // Given
7 HttpUriRequest request = new HttpGet( "https://api.github.com/users/eugenp" );
8
9 // When
10 HttpResponse response = HttpClientBuilder.create().build().execute( request );
11
12 // Then
13 GitHubUser resource = RetrieveUtil.retrieveResourceFromResponse(
14 response, GitHubUser.class);
15 assertThat( "eugenp", Matchers.is( resource.getLogin() ) );
16}
17