public void shouldRetrieveResource() throws Exception {
// Given
when(webResource.accept(mediaType)).thenReturn(typeBuilder);
when(typeBuilder.get(ClientResponse.class)).thenReturn(response);
BaseResourceRepresentation representation = new BaseResourceRepresentation();
when(parser.parse(response, 200, BaseResourceRepresentation.class)).thenReturn(representation);
// When
BaseResourceRepresentation result = restConnector.get(PATH, mediaType,
BaseResourceRepresentation.class);
// Then
assertThat(result, sameInstance(representation));
}