### Question:
DestinationSequence extends AbstractSequence { synchronized void scheduleSequenceTermination(long inactivityTimeout) { if (inactivityTimeout <= 0) { return; } boolean scheduled = null != scheduledTermination; if (null == scheduledTermination) { scheduledTermination = new SequenceTermination(); } scheduledTermination.updateInactivityTimeout(inactivityTimeout); if (!scheduled) { destination.getManager().getTimer().schedule(scheduledTermination, inactivityTimeout); } } 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 testScheduleSequenceTermination() throws SequenceFault, InterruptedException { Timer timer = new Timer(); RMEndpoint rme = control.createMock(RMEndpoint.class); EasyMock.expect(rme.getProxy()).andReturn(control.createMock(Proxy.class)).anyTimes(); setUpDestination(timer, rme); DestinationSequence seq = new DestinationSequence(id, ref, destination, ProtocolVariation.RM10WSA200408); destination.terminateSequence(seq, true); EasyMock.expectLastCall(); Message message = setUpMessage("1"); long arrival = System.currentTimeMillis(); EasyMock.expect(rme.getLastApplicationMessage()).andReturn(arrival); control.replay(); config.setInactivityTimeout(200L); seq.acknowledge(message); Thread.sleep(250L); control.verify(); }