XmlGenericMapAdapter extends XmlAdapter<MapType, Map<String, String>> { @Override public MapType marshal(Map<String, String> v) throws Exception { MapType mapType = new MapType(); if (v != null) { for (Map.Entry<String, String> entry : v.entrySet()) { MapEntryType mapEntryType = new MapEntryType(); mapEntryType.setKey(entry.getKey()); mapEntryType.setValue(entry.getValue()); mapType.getEntry().add(mapEntryType); } } return mapType; }  @Override Map<String, String> unmarshal(MapType v); @Override MapType marshal(Map<String, String> v);  }
@Test public void testMarshal_1() throws Exception { XmlGenericMapAdapter fixture = new XmlGenericMapAdapter(); Map<String, String> v = new HashMap(); MapType result = fixture.marshal(v); assertNotNull(result); }
@Test public void testMarshal_2() throws Exception { XmlGenericMapAdapter fixture = new XmlGenericMapAdapter(); Map<String, String> v = new HashMap(); MapType result = fixture.marshal(v); assertNotNull(result); }
@Test public void testMarshal_3() throws Exception { XmlGenericMapAdapter fixture = new XmlGenericMapAdapter(); Map<String, String> v = null; MapType result = fixture.marshal(v); assertNotNull(result); }