assertEquals(Names.WSA_ANONYMOUS_ADDRESS, recovered.getAcksTo().getAddress().getValue());
assertNull(recovered.getEndpointIdentifier());
if ("sequence1".equals(recovered.getIdentifier().getValue())) {
assertNull(recovered.getLastMessageNr());
assertEquals(1, recovered.getAcknowledgment().getAcknowledgementRange().size());
AcknowledgementRange r = recovered.getAcknowledgment().getAcknowledgementRange().get(0);
assertEquals(BigInteger.ONE, r.getLower());
assertEquals(BigInteger.ONE, r.getUpper());
} else {
assertEquals(BigInteger.TEN, recovered.getLastMessageNr());
assertEquals(2, recovered.getAcknowledgment().getAcknowledgementRange().size());
AcknowledgementRange r = recovered.getAcknowledgment().getAcknowledgementRange().get(0);
assertEquals(BigInteger.ONE, r.getLower());
assertEquals(BigInteger.ONE, r.getUpper());
r = recovered.getAcknowledgment().getAcknowledgementRange().get(1);
assertEquals(new BigInteger("3"), r.getLower());
assertEquals(BigInteger.TEN, r.getUpper());
}
}
}