@Test
public void testCompare() {

    List<Comparator> comparators = new ArrayList<Comparator>();
    comparators.add(new SimpleComparator());
    comparators.add(new MapComparator());
    comparators.add(new ObjectComparator());
    IntegratedComparator comparator = new IntegratedComparator(comparators);
    Map<String, String> extensions = new HashMap<String, String>();
    extensions.put("name", "sandbox-repeater");
    extensions.put("version", "1.0.0");
    IntegratedCompareDO left = IntegratedCompareDO.builder()
            .name("sandbox")
            .character('s')
            .extentions(extensions)
            .salary(10000.0D)
            .count(10)
            .localDateTime(LocalDateTime.now())
            .money(new BigDecimal(10000.0))
            .student(Student.builder()
                    .name("YueBing")
                    .age(29)
                    .school("Peking University")
                    .build())
            .build();
    Map<String, String> extensions2 = new HashMap<String, String>();
    extensions2.put("name", "sandbox-repeater");
    extensions2.put("version", "1.0.1");
    extensions2.put("hacker", "YueBing");
    IntegratedCompareDO right = IntegratedCompareDO.builder()
            .name("repeater")
            .character('t')
            .extentions(extensions2)
            .salary(10000.1D)
            .count(12)
            .localDateTime(LocalDateTime.now())
            .money(new BigDecimal(10000.0))
            .student(Student.builder()
                    .name("YueBing")
                    .age(29)
                    .school("Tsinghua university")
                    .build())
            .build();
    CompareResult result = comparator.compare(left, right);
    Assert.assertNotEquals(result, null);
    Assert.assertTrue(result.hasDifference());
    Assert.assertEquals(result.getDifferences().size(), 8);
}