### Question:
ServiceMap { public T getItem( String key ) { if ( key == null ) { return null; } synchronized ( map ) { return map.get( key ) != null ? map.get( key ).getItem() : null; } }  T getItem( String key ); void itemAdded( T item, @SuppressWarnings( "rawtypes" ) Map config ); void itemRemoved( T item, @SuppressWarnings( "rawtypes" ) Map config ); static final String SERVICE_KEY_PROPERTY; }### Answer:
@Test public void testGetItem() { assertEquals( VALUE1, serviceMap.getItem( KEY1 ) ); assertEquals( VALUE2, serviceMap.getItem( KEY2 ) ); }
@Test public void nullKeyIsAllowed() { assertNull( serviceMap.getItem( null ) ); }