@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); }