DefaultMapBackedModel implements MapBackedModel { @Override public MapBackedModel<?> createChildMap(String name) { MapBackedModel child = new DefaultMapBackedModel(); values.put(name, child.getResult()); return child; }  @Override void addValue(String name, Object result); @Override MapBackedModel<?> createChildMap(String name); @Override ListBackedModel<?> createChildList(String name); @Override Map<String, Object> getResult(); @Override boolean isEmpty();  }
@Test public void createChildMap() { DefaultMapBackedModel model = new DefaultMapBackedModel(); model.createChildMap("childMap"); assertEquals(1, model.getResult().size()); assertTrue(model.getResult().get("childMap") instanceof LinkedHashMap); }