DelegatingResponse implements Response { public int getStatusCode() throws Exception { return delegate.getStatusCode(); } 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 getStatusCodeShouldDelegates() throws Exception { when(mockResponse.getStatusCode()).thenReturn(123); assertEquals(123, toTest.getStatusCode()); }