### Question:
SoapServiceClient implements InvocationHandler { protected synchronized RemoteCallReturn callSoapClient(SoapCall<T> soapCall) { return soapClientHandler.invokeSoapCall(soapCall); } protected  SoapServiceClient(SoapClientHandlerInterface<T> soapClientHandler,
      T soapClient); @Override Object invoke(Object proxy, final Method method, final Object[] args); void setEndpointAddress(String endpointAddress); Object getSoapClient();  }### Answer:
@Test @SuppressWarnings("unchecked") public void testCallSoapClient() throws Throwable { RemoteCallReturn expectedRemoteCallReturn = new RemoteCallReturn.Builder().build(); SoapCall<Object> soapCall = Mockito.mock(SoapCall.class); when(soapClientHandler.invokeSoapCall(soapCall)).thenReturn(expectedRemoteCallReturn); RemoteCallReturn remoteCallReturn = soapServiceClient.callSoapClient(soapCall); assertSame(expectedRemoteCallReturn, remoteCallReturn); }
@Test @SuppressWarnings("unchecked") public void testCallSoapClient_exception() { RemoteCallReturn expectedRemoteCallReturn = new RemoteCallReturn.Builder().withException(MockSoapClient.EXCEPTION).build(); SoapCall<Object> soapCall = Mockito.mock(SoapCall.class); when(soapClientHandler.invokeSoapCall(soapCall)).thenReturn(expectedRemoteCallReturn); RemoteCallReturn testRemoteCallReturn = soapServiceClient.callSoapClient(soapCall); assertSame(MockSoapClient.EXCEPTION, testRemoteCallReturn.getException()); }