HttpResponse implements Response, Disposable { public <T> T deserialize() throws Exception { return baseResponseDeserializer.<T>deserialize(this); } HttpResponse(ResponseDeserializer baseResponseDeserializer, ResponseDeserializer customTypeResponseDeserializer, Request request, HttpResource resource); int getStatusCode(); String getStatusMessage(); String getContentType(); Charset getCharset(); String getContentEncoding(); Type getExpectedGenericType(); Class<?> getExpectedType(); Request getRequest(); InputStream asStream(); T deserialize(); T to(Class<T> type); T to(Class<T> type, Type genericType); void dispose();  }
@Test public void deserializeShouldUseBaseResponseDeserializer() throws Exception { when(mockBaseResponseDeserializer.deserialize(toTest)).thenReturn(10); assertEquals(10, toTest.deserialize()); }