### Question:
ServiceMap { public void itemRemoved( T item, @SuppressWarnings( "rawtypes" ) Map config ) { synchronized ( map ) { try { map.remove( getKeyFromConfig( config ) ); } catch ( IllegalArgumentException e ) { } } }  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 testItemRemoved() { serviceMap.itemRemoved( VALUE1, ImmutableMap.of( ServiceMap.SERVICE_KEY_PROPERTY, KEY1 ) ); assertNull( VALUE1, serviceMap.getItem( KEY1 ) ); assertEquals( VALUE2, serviceMap.getItem( KEY2 ) ); serviceMap.itemRemoved( null, ImmutableMap.of( ServiceMap.SERVICE_KEY_PROPERTY, "keyNotThere" ) ); }