DelegatingResponse implements Response { public Class<?> getExpectedType() { return delegate.getExpectedType(); } DelegatingResponse(Response delegate); Request getRequest(); int getStatusCode(); String getContentType(); Charset getCharset(); String getContentEncoding(); Type getExpectedGenericType(); Class<?> getExpectedType(); T deserialize(); T to(Class<T> type); T to(Class<T> type, Type genericType); InputStream asStream(); void dispose();  }
@Test public void getExpectedTypeShouldDelegates() throws Exception { when(mockResponse.getExpectedType()).thenReturn((Class)Object.class); assertEquals(Object.class, toTest.getExpectedType()); }