### Question:
DestinationSequence extends AbstractSequence { synchronized void cancelTermination() { if (null != scheduledTermination) { scheduledTermination.cancel(); } } DestinationSequence(Identifier i, EndpointReferenceType a, Destination d, ProtocolVariation pv);  DestinationSequence(Identifier i, EndpointReferenceType a,
                              long lmn, SequenceAcknowledgement ac, ProtocolVariation pv);  DestinationSequence(Identifier i, EndpointReferenceType a,
                              long lmn, boolean t, SequenceAcknowledgement ac, ProtocolVariation pv); EndpointReferenceType getAcksTo(); long getLastMessageNumber(); SequenceAcknowledgement getAcknowledgment(); String getEndpointIdentifier(); void acknowledge(Message message); boolean sendAcknowledgement(); boolean isTerminated();  }### Answer:
@Test public void testCancelTermination() { destination = control.createMock(Destination.class); manager = control.createMock(RMManager.class); EasyMock.expect(destination.getManager()).andReturn(manager); Timer t = new Timer(); EasyMock.expect(manager.getTimer()).andReturn(t); DestinationSequence seq = new DestinationSequence(id, ref, destination, ProtocolVariation.RM10WSA200408); control.replay(); seq.scheduleSequenceTermination(30000L); seq.cancelTermination(); t.cancel(); control.verify(); }