### Question:
RMManager { void recoverReliableEndpoint(Endpoint endpoint, Conduit conduit) { if (null == store || null == retransmissionQueue) { return; } String id = RMUtils.getEndpointIdentifier(endpoint, getBus()); Collection<SourceSequence> sss = store.getSourceSequences(id); Collection<DestinationSequence> dss = store.getDestinationSequences(id); if ((null == sss || sss.isEmpty()) && (null == dss || dss.isEmpty())) { return; } LOG.log(Level.FINE, "Number of source sequences: {0}", sss.size()); LOG.log(Level.FINE, "Number of destination sequences: {0}", dss.size()); LOG.log(Level.FINE, "Recovering {0} endpoint with id: {1}", new Object[] {null == conduit ? "client" : "server", id}); RMEndpoint rme = createReliableEndpoint(endpoint); rme.initialise(getConfiguration(), conduit, null, null, null); synchronized (reliableEndpoints) { reliableEndpoints.put(endpoint, rme); } for (SourceSequence ss : sss) { recoverSourceSequence(endpoint, conduit, rme.getSource(), ss); } for (DestinationSequence ds : dss) { recoverDestinationSequence(endpoint, conduit, rme.getDestination(), ds); } retransmissionQueue.start(); redeliveryQueue.start(); }  void startServer(Server server); void stopServer(Server server); void clientCreated(final Client client); void clientDestroyed(Client client); void setRMNamespace(String uri); void setRM10AddressingNamespace(RM10AddressingNamespaceType addrns); Bus getBus(); @Resource void setBus(Bus b); RMStore getStore(); void setStore(RMStore s); RetransmissionQueue getRetransmissionQueue(); void setRetransmissionQueue(RetransmissionQueue rq); RedeliveryQueue getRedeliveryQueue(); void setRedeliveryQueue(RedeliveryQueue redeliveryQueue); SequenceIdentifierGenerator getIdGenerator(); void setIdGenerator(SequenceIdentifierGenerator generator); Timer getTimer(); BindingFaultFactory getBindingFaultFactory(Binding binding); void setDeliveryAssurance(DeliveryAssuranceType dat); DestinationPolicyType getDestinationPolicy(); void setDestinationPolicy(DestinationPolicyType destinationPolicy); RMConfiguration getConfiguration(); void setConfiguration(RMConfiguration configuration); RMConfiguration getEffectiveConfiguration(Message msg); void setRMAssertion(org.apache.cxf.ws.rmp.v200502.RMAssertion rma); SourcePolicyType getSourcePolicy(); void setSourcePolicy(SourcePolicyType sp); RMEndpoint getReliableEndpoint(Message message); RMEndpoint findReliableEndpoint(QName qn); Destination getDestination(Message message); Source getSource(Message message); SourceSequence getSequence(Identifier inSeqId, Message message, AddressingProperties maps); @PreDestroy void shutdown(); void init(Bus b); void initializeInterceptorChain(Message msg); PhaseInterceptorChain getRetransmitChain(Message msg); static final String WSRM_VERSION_PROPERTY; static final String WSRM_WSA_VERSION_PROPERTY; static final String WSRM_LAST_MESSAGE_PROPERTY; static final String WSRM_INACTIVITY_TIMEOUT_PROPERTY; static final String WSRM_RETRANSMISSION_INTERVAL_PROPERTY; static final String WSRM_EXPONENTIAL_BACKOFF_PROPERTY; static final String WSRM_ACKNOWLEDGEMENT_INTERVAL_PROPERTY; }### Answer:
@Test public void testRecoverReliableEndpoint() { manager = new RMManager(); Endpoint endpoint = control.createMock(Endpoint.class); Conduit conduit = control.createMock(Conduit.class); control.replay(); manager.recoverReliableEndpoint(endpoint, conduit); control.verify(); control.reset(); RMStore store = control.createMock(RMStore.class); manager.setStore(store); control.replay(); manager.recoverReliableEndpoint(endpoint, conduit); control.verify(); }