### Question:
DestinationSequence extends AbstractSequence { void purgeAcknowledged(long messageNr) { RMStore store = destination.getManager().getStore(); if (null == store) { return; } store.removeMessages(getIdentifier(), Collections.singleton(messageNr), false); } 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 testPurgeAcknowledged() { destination = control.createMock(Destination.class); DestinationSequence seq = new DestinationSequence(id, ref, destination, ProtocolVariation.RM10WSA200408); manager = control.createMock(RMManager.class); EasyMock.expect(destination.getManager()).andReturn(manager); RMStore store = control.createMock(RMStore.class); EasyMock.expect(manager.getStore()).andReturn(store); store.removeMessages(EasyMock.eq(id), CastUtils.cast(EasyMock.isA(Collection.class), Long.class), EasyMock.eq(false)); EasyMock.expectLastCall(); control.replay(); seq.purgeAcknowledged(1); control.verify(); }