### Question:
NestedMaps { public static <T> Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream) { final Map<String, T> out = new HashMap<>(); mapStream.forEach(m -> deepMerge(out, m)); return out; } private  NestedMaps(); @SuppressWarnings("unchecked") static Optional<T> getValue(Map<String, Object> data, String path); static Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream); @SuppressWarnings({ "rawtypes", "unchecked" }) static void deepMerge(Map left, Map right); static Map<String, Object> unflatten(Map<String, Object> flattened);  }### Answer:
@Test void testDeepMerge() { final HashMap<String, Object> target = new HashMap<>(); NestedMaps.deepMerge(target, NESTED_MAP_1); NestedMaps.deepMerge(target, NESTED_MAP_2); checkTargetMap(target); }
@Test void testDeepMergeStream() { final Map<String, Object> target = NestedMaps.deepMerge(Stream.of(NESTED_MAP_1, NESTED_MAP_2)); checkTargetMap(target); }