### Question:
ServiceMap { protected Map<String, T> getMap() { synchronized ( map ) { Map<String, T> m = map.values().stream().collect( Collectors.toMap( MapItem::getKey, MapItem::getItem ) ); return Collections.unmodifiableMap( m ); } }  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 testGetMap() { Map<String, String> map = serviceMap.getMap(); assertEquals( VALUE1, map.get( KEY1 ) ); assertEquals( VALUE2, map.get( KEY2 ) ); }