### Question:
MapBuilder extends ContentBuilderBase<Map> implements ContentBuilder<Map<String, Object>> { @Override public Map<String, Object> buildContent(Collection<Data> elements) throws BagriException { Map<String, Object> result = new HashMap<>(elements.size()); for (Data data: elements) { result.put(data.getName(), data.getValue()); } return result; } MapBuilder(ModelManagement model); @Override void init(Properties properties); @Override Map<String, Object> buildContent(Collection<Data> elements);  }### Answer:
@Test public void testBuildManual() throws Exception { ModelManagement model = new ModelManagementImpl(); List<Data> data = new ArrayList<>(); data.add(new Data(new Path("/firstName", "/", NodeKind.attribute, 2, 1, 2, XQItemType.XQBASETYPE_STRING, Occurrence.onlyOne), new Element(new int[] {1}, "John"))); data.add(new Data(new Path("/lastName", "/", NodeKind.attribute, 3, 1, 3, XQItemType.XQBASETYPE_STRING, Occurrence.onlyOne), new Element(new int[] {2}, "Smith"))); data.add(new Data(new Path("/age", "/", NodeKind.attribute, 4, 1, 4, XQItemType.XQBASETYPE_LONG, Occurrence.onlyOne), new Element(new int[] {3}, new Long(25)))); MapBuilder builder = new MapBuilder(model); Map<String, Object> content = builder.buildContent(data); System.out.println(content); assertNotNull(content); assertEquals("John", content.get("firstName")); assertEquals("Smith", content.get("lastName")); assertEquals(25L, content.get("age")); }