public void testSetAcknowledged() throws RMException {
SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
setUpSource();
seq.setSource(source);
SequenceAcknowledgement ack = seq.getAcknowledgement();
ack = factory.createSequenceAcknowledgement();
SequenceAcknowledgement.AcknowledgementRange r =
factory.createSequenceAcknowledgementAcknowledgementRange();
r.setLower(new Long(1));
r.setUpper(new Long(2));
ack.getAcknowledgementRange().add(r);
r = factory.createSequenceAcknowledgementAcknowledgementRange();
r.setLower(new Long(4));
r.setUpper(new Long(6));
ack.getAcknowledgementRange().add(r);
r = factory.createSequenceAcknowledgementAcknowledgementRange();
r.setLower(new Long(8));
r.setUpper(new Long(10));
ack.getAcknowledgementRange().add(r);
rq.purgeAcknowledged(seq);
EasyMock.expectLastCall();
control.replay();
seq.setAcknowledged(ack);
assertSame(ack, seq.getAcknowledgement());
assertEquals(3, ack.getAcknowledgementRange().size());
assertTrue(!seq.isAcknowledged(3));
assertTrue(seq.isAcknowledged(5));
control.verify();
}