@Test public void testCompareNestedEntitiesChildCountsDiffer() throws Exception { ParentEntity lhs = new ParentEntity(); ParentEntity rhs = new ParentEntity(); lhs.getChildren().add(new ChildEntity("a string", 43)); lhs.getChildren().add(new ChildEntity("another string", 42)); rhs.getChildren().add(new ChildEntity("a string", 43)); assertTrue(comparator.isDifferent(lhs, rhs)); }