### Question:
IdName extends Hash { public final Integer getId() { return id; } IdName( Integer id, String name );  IdName( String name ); final Integer getId(); final String getName(); @Override final String toString(); @Override final boolean equals( Object obj ); @Override final int hashCode();  }### Answer:
@Test public void getId() { assertEquals( 1, new IdName( 1, "foo" ).getId() ); assertEquals( 1, new IdName( 1, "bar" ).getId() ); assertEquals( 2, new IdName( 2, "foo" ).getId() ); assertEquals( 2, new IdName( 2, "bar" ).getId() ); }