### Question:
MapAdapter extends XmlAdapter<Map, java.util.Map<String, java.lang.Object>> { @Override public java.util.Map<String, java.lang.Object> unmarshal(Map input) throws Exception { if (input == null) { return null; } else { java.util.Map<String, java.lang.Object> output = new HashMap<>(); input.getEntries().forEach((entry) -> output.put(entry.getKey(), entry.getValue())); return output; } }  @Override Map marshal(java.util.Map<String, java.lang.Object> input); @Override java.util.Map<String, java.lang.Object> unmarshal(Map input);  }### Answer:
@Test public void unmarshal() throws Exception { Map input = new Map(); input.getEntries().add(new MapEntry().withKey("label").withValue("Release")); input.getEntries().add(new MapEntry().withKey("count").withValue(13)); java.util.Map<String, java.lang.Object> output = new MapAdapter().unmarshal(input); assertEquals(2, output.size()); assertEquals("Release", output.get("label")); assertEquals(13, output.get("count")); }
@Test public void unmarshalNull() throws Exception { assertNull(new MapAdapter().unmarshal(null)); }