### Question:
Proxy { protected Client createClient(Bus bus, Endpoint endpoint, final ProtocolVariation protocol, Conduit conduit, final EndpointReferenceType address) { ConduitSelector cs = new DeferredConduitSelector(conduit) { @Override public synchronized Conduit selectConduit(Message message) { Conduit conduit = null; EndpointInfo endpointInfo = getEndpoint().getEndpointInfo(); EndpointReferenceType original = endpointInfo.getTarget(); try { if (null != address) { endpointInfo.setAddress(address); } conduit = super.selectConduit(message); } finally { endpointInfo.setAddress(original); } return conduit; } }; RMClient client = new RMClient(bus, endpoint, cs); WSAddressingFeature wsa = new WSAddressingFeature(); wsa.setAddressingRequired(true); wsa.initialize(client, bus); Map<String, Object> context = client.getRequestContext(); context.put(MAPAggregator.ADDRESSING_NAMESPACE, protocol.getWSANamespace()); context.put(RMManager.WSRM_VERSION_PROPERTY, protocol.getWSRMNamespace()); context.put(RMManager.WSRM_WSA_VERSION_PROPERTY, protocol.getWSANamespace()); return client; } 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 testRMClientConstruction() { Proxy proxy = new Proxy(rme); Bus bus = control.createMock(Bus.class); EasyMock.expect(bus.getExtension(WSAddressingFeatureApplier.class)) .andReturn(new WSAddressingFeatureApplier() { @Override public void initializeProvider(WSAddressingFeature feature, InterceptorProvider provider, Bus bus) { } }).anyTimes(); Endpoint endpoint = control.createMock(Endpoint.class); Conduit conduit = control.createMock(Conduit.class); org.apache.cxf.ws.addressing.EndpointReferenceType address = control.createMock(org.apache.cxf.ws.addressing.EndpointReferenceType.class); control.replay(); assertNotNull(proxy.createClient(bus, endpoint, ProtocolVariation.RM10WSA200408, conduit, address)); }