### Question:
MapConf extends AbstractConf { static MapConf singletonConf(final String key, final Object value) { return new MapConf(Collections.singletonMap(key, value), null, true); } 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 shouldThrowGivenInvalidConfWhenCreating() { Map<String, Object> origin = new HashMap<>(); origin.put("field", VALUE_1); origin.put("field.foo", MapConf.singletonConf("bar", VALUE_2)); Assertions.assertThrows(InvalidConfException.class, () -> { new MapConf(origin); }); }