120121122123124125126
assertFalse(guangdong.notExisted()); } @Test public void testHashCode() { assertEquals(guangdong.hashCode(), new Company("Guangdong", 1).hashCode()); }
136137138139140141142143144145
//类型不同、业务主键相同的对象不等价 assertFalse(guangdong.equals(financial)); //非业务主键不影响等价性 guangdong.disable(); assertTrue(guangdong.equals(new Company("Guangdong", 1))); //如果a.equals(b),那么b.equals(a) assertTrue(new Company("Guangdong", 1).equals(guangdong)); }