### Question:
MapUtil { public static Map<String, String> load( Reader reader ) throws IOException { Properties props = new Properties(); props.load( reader ); return new HashMap<>( (Map) props ); }  static Map<K, V> genericMap( Object... objects ); @SuppressWarnings( "unchecked" ) static Map<K,V> genericMap( Map<K,V> targetMap, Object... objects ); static Map<String, String> stringMap( String... strings ); static Map<String, String> stringMap( Map<String, String> targetMap,
            String... strings ); static Map<String, Object> map( Object... objects ); static Map<String, Object> map( Map<String, Object> targetMap,
            Object... objects ); static Map<String, String> load( Reader reader ); static Map<String, String> loadStrictly( Reader reader ); static Map<String,String> load( InputStream stream ); static Map<String, String> loadStrictly( InputStream stream ); static Map<String, String> load( File file ); static void store( Map<String, String> config, File file ); static void storeStrictly( Map<String, String> config, File file ); static void store( Map<String, String> config, OutputStream stream ); static void storeStrictly( Map<String, String> config, OutputStream stream ); static void store( Map<String, String> config, Writer writer ); static void storeStrictly( Map<String, String> config, Writer writer ); static Map<V, K> reverse( Map<K, V> map ); static Map<K,V> copyAndPut( Map<K,V> map, K key, V value ); static Map<K,V> copyAndRemove( Map<K,V> map, K key ); static Map<K, V> toMap( Iterable<Pair<K, V>> pairs ); static Map<K, V> toMap( Iterator<Pair<K, V>> pairs ); static MapBuilder<K, V> entry( K key, V value ); static void trimToList( Map<K,V> map, List<T> newBackingData, Function<T,K> keyExtractor ); static void trimToFlattenedList( Map<K,V> map, List<T> newBackingData,
            Function<T,Stream<K>> keyExtractor ); static void trimToList( Map<K,V> map, Set<K> retainedKeys );  }### Answer:
@Test void loadSpacedValue() throws Exception { Map<String,String> expected = new HashMap<>(); expected.put( "key", "value" ); InputStream inputStream = new ByteArrayInputStream( " key = value ".getBytes() ); Map<String,String> result = MapUtil.load( inputStream ); assertEquals( expected, result ); }
@Test void loadNothing() throws Exception { Map<String,String> expected = new HashMap<>(); expected.put( "key", "" ); InputStream inputStream = new ByteArrayInputStream( " key = ".getBytes() ); Map<String,String> result = MapUtil.load( inputStream ); assertEquals( expected, result ); }