public UnloadedMessageResult(final Message<Id> message, final MailboxException exception) { super(); internalDate = message.getInternalDate(); size = message.getFullContentOctets(); uid = message.getUid(); flags = message.createFlags(); modSeq = message.getModSeq(); this.exception = exception; }
@Test public void testShouldReturnNegativeWhenFirstLessThanSecond() throws Exception { Message<Long> one = buildMessage(98); Message<Long> two = buildMessage(99); assertTrue(one.compareTo(two) < 0); }
@Test public void testShouldReturnZeroWhenFirstEqualsSecond() throws Exception { Message<Long> one = buildMessage(90); Message<Long> two = buildMessage(90); assertEquals(0, one.compareTo(two)); }
@Test public void testShouldReturnPositiveWhenFirstGreaterThanSecond() throws Exception { Message<Long> one = buildMessage(100); Message<Long> two = buildMessage(99); assertTrue(one.compareTo(two) > 0); }