### Question:
MapConf extends AbstractConf { @Override public Map<String, Object> getConfAsMap() { Map<String, Object> map = new HashMap<>(); if (fallback != null) { map.putAll(flatten(fallback.getConfAsMap())); } map.putAll(flatten(parameters)); return Collections.unmodifiableMap(map); } MapConf(final Map<String, ?> parameters);   MapConf(final Map<String, ?> parameters,
            final boolean explode); protected  MapConf(final Map<String, ?> parameters,
                      final Conf fallback,
                      final boolean explode); @Override String getString(final String path); @Override long getLong(final String path); @Override int getInt(final String path); @Override boolean getBoolean(final String path); @Override double getDouble(final String path); @Override @SuppressWarnings("unchecked") List<String> getStringList(final String path); @Override Conf getSubConf(final String path); @Override @SuppressWarnings("unchecked") List<Conf> getSubConfList(final String path); @Override boolean hasPath(final String path); @Override Conf withFallback(final Conf fallback); @Override Map<String, Object> getConfAsMap(); @Override Properties getConfAsProperties(); @Override String toString();  }### Answer:
@Test public void shouldConvertToFlapMap() { Map<String, Object> origin = new HashMap<>(); origin.put("field.foo", "?"); origin.put("field.bar", new HashMap<>(){{ put("foo", "?"); put("bar", "?"); }}); Map<String, Object> result = new MapConf(origin).getConfAsMap(); Assertions.assertEquals(3, result.size()); Assertions.assertTrue(result.containsKey("field.foo")); Assertions.assertTrue(result.containsKey("field.bar.foo")); Assertions.assertTrue(result.containsKey("field.bar.bar")); }