### Question:
MapConf extends AbstractConf { @Override public String getString(final String path) { final Object o = findForPathOrThrow(path, Conf::getString); try { return TypeConverter.getString(o); } catch (final IllegalArgumentException e) { throw new InvalidConfException( "Type mismatch for path '" + path + "': " + o.getClass().getSimpleName() + "<> String"); } } 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 shouldThrowExceptionWhenKeyIsMissing() { MapConf conf = new MapConf(Collections.emptyMap()); Assertions.assertThrows(MissingConfException.class, () -> conf.getString("foo")); }
@Test public void shouldGetSubConfGivenPath() { Conf conf = new MapConf(MIXIN_MAP_WITH_CONF); Assertions.assertEquals(VALUE_2, conf.getString("field.bar.foo.bar")); }