### Question:
Proxy { void createSequenceResponse(final Object createResponse, ProtocolVariation protocol) throws RMException { LOG.fine("sending CreateSequenceResponse from client side"); RMConstants constants = protocol.getConstants(); final OperationInfo oi = reliableEndpoint.getEndpoint(protocol).getEndpointInfo().getService() .getInterface().getOperation(constants.getCreateSequenceResponseOnewayOperationName()); invoke(oi, protocol, new Object[] {createResponse}); } Proxy(RMEndpoint rme); CreateSequenceResponseType createSequence(EndpointReferenceType defaultAcksTo, RelatesToType relatesTo,
             boolean isServer, final ProtocolVariation protocol, final Exchange exchange, Map<String, Object> context);  }### Answer:
@Test public void testCreateSequenceResponse() throws NoSuchMethodException, RMException { Method m = Proxy.class.getDeclaredMethod("invoke", new Class[] {OperationInfo.class, ProtocolVariation.class, Object[].class, Map.class}); Proxy proxy = EasyMock.createMockBuilder(Proxy.class) .addMockedMethod(m).createMock(control); proxy.setReliableEndpoint(rme); Endpoint endpoint = control.createMock(Endpoint.class); EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes(); EndpointInfo epi = control.createMock(EndpointInfo.class); EasyMock.expect(endpoint.getEndpointInfo()).andReturn(epi).anyTimes(); ServiceInfo si = control.createMock(ServiceInfo.class); EasyMock.expect(epi.getService()).andReturn(si).anyTimes(); InterfaceInfo ii = control.createMock(InterfaceInfo.class); EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes(); OperationInfo oi = control.createMock(OperationInfo.class); EasyMock.expect(ii.getOperation(RM10Constants.CREATE_SEQUENCE_RESPONSE_ONEWAY_QNAME)) .andReturn(oi).anyTimes(); org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType csr = control.createMock(org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType.class); expectInvoke(proxy, oi, null); control.replay(); proxy.createSequenceResponse(csr, ProtocolVariation.RM10WSA200408); }