### Question:
IdDecorator { @Override public int hashCode() { return System.identityHashCode(instance); } IdDecorator(T instance); @SuppressWarnings("unchecked") @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@SuppressWarnings({"rawtypes", "unchecked"}) @Test public void testHashCode() throws Exception { Scheduler scheduler = new Scheduler(new DBConnectionInfo(), new ZKCache("abc_group"), "abc_group"); Scheduler scheduler1 = new Scheduler(new DBConnectionInfo(), new ZKCache("abc_group_1"), "abc_group_1"); Assert.assertEquals(new IdDecorator(scheduler).hashCode(), new IdDecorator(scheduler).hashCode()); Assert.assertNotSame(new IdDecorator(scheduler).hashCode(), new IdDecorator(scheduler1).hashCode()); }