### Question:
IdNameMap { public int size() { return byId.size(); } IdNameMap(); final T get( Integer id ); final T get( String name ); T add( T t ); void addAll( IdNameMap<T> ts ); final Set<T> values(); final void lock(); int size(); abstract T makeNew( String name );  }### Answer:
@Test public void check_a() throws Exception { assertEquals( 2, map.size() ); check( "a", 1, a ); assertEquals( 2, map.size() ); }
@Test public void check_b() throws Exception { assertEquals( 2, map.size() ); check( "b", 2, b ); assertEquals( 2, map.size() ); }