@Test
public void compare() {

    Instant now = Instant.now();
    assertEquals(0, AggregationUtils.compare(1, 1));
    assertEquals(0, AggregationUtils.compare(1L, 1L));
    assertEquals(0, AggregationUtils.compare(1F, 1F));
    assertEquals(0, AggregationUtils.compare(1D, 1D));
    assertEquals(0, AggregationUtils.compare("1", "1"));
    assertEquals(0, AggregationUtils.compare(Date.from(now), Date.from(now)));
    assertEquals(0, AggregationUtils.compare(now, now));
    assertEquals(0, AggregationUtils.compare(now, now.toString()));
    assertEquals(0, AggregationUtils.compare(1, "1"));
    assertEquals(0, AggregationUtils.compare(1D, 1L));
}