📅  最后修改于: 2022-03-11 14:52:17.534000             🧑  作者: Mango
@Test
public void testRefEqu() throws IOException {
dummy inst1 = new dummy();
inst1.nestedClass = new dummy2();
inst1.nestedClass.intVal = 2;
dummy inst2 = new dummy();
inst2.nestedClass = new dummy2();
inst2.nestedClass.intVal = 2;
boolean isEqual1 = EqualsBuilder.reflectionEquals(inst1.nestedClass, inst2.nestedClass);
boolean isEqual2 = EqualsBuilder.reflectionEquals(inst1, inst2);
}