public void deserializingAllPossibleValues() {
// Arrange
BrokerPropertiesMapper mapper = new BrokerPropertiesMapper();
// Act
BrokerProperties properties = mapper
.fromString(testBrokerPropertiesString);
// Assert
assertNotNull(properties);
long lockedUntilDelta = properties.getLockedUntilUtc().getTime()
- lockedUntilUtc.getTime();
long schedTimeDelta = properties.getScheduledEnqueueTimeUtc().getTime()
- schedTimeUtc.getTime();
assertEquals("corid", properties.getCorrelationId());
assertEquals("sesid", properties.getSessionId());
assertEquals(5, (int) properties.getDeliveryCount());
assertTrue(Math.abs(lockedUntilDelta) < 2000);
assertEquals("loctok", properties.getLockToken());
assertEquals("mesid", properties.getMessageId());
assertEquals("lab", properties.getLabel());
assertEquals("repto", properties.getReplyTo());
assertEquals(7, (long) properties.getSequenceNumber());
assertEquals(8.123, properties.getTimeToLive(), .001);
assertEquals("to", properties.getTo());
assertTrue(Math.abs(schedTimeDelta) < 2000);
assertEquals("reptosesid", properties.getReplyToSessionId());
assertEquals("mesloc", properties.getMessageLocation());
assertEquals("locloc", properties.getLockLocation());
}