### Question:
IdName extends Hash { public final String getName() { return name; } 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 getName() { assertEquals( "foo", new IdName( 1, "foo" ).getName() ); assertEquals( "bar", new IdName( 1, "bar" ).getName() ); assertEquals( "foo", new IdName( 2, "foo" ).getName() ); assertEquals( "bar", new IdName( 2, "bar" ).getName() ); }