@Test public void shouldMarshal() throws Exception { StringWriter writer = new StringWriter(); Marshaller marshaller = jaxb.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(CONTAINER, writer); assertXMLEqual(XML, writer.toString().replace(" standalone=\"yes\"", "")); }
@Override public AdaptedMapping marshal(Mapping mapping) throws Exception { try { return new AdaptedMapping(mapping); } catch (Exception e) { e.printStackTrace(); throw e; } }
JmsMappingAdapter extends XmlAdapter<JmsMappingAdapter.AdaptedMapping, Mapping> { @Override public AdaptedMapping marshal(Mapping mapping) throws Exception { try { return new AdaptedMapping(mapping); } catch (Exception e) { e.printStackTrace(); throw e; } } }
JmsMappingAdapter extends XmlAdapter<JmsMappingAdapter.AdaptedMapping, Mapping> { @Override public AdaptedMapping marshal(Mapping mapping) throws Exception { try { return new AdaptedMapping(mapping); } catch (Exception e) { e.printStackTrace(); throw e; } }  }
JmsMappingAdapter extends XmlAdapter<JmsMappingAdapter.AdaptedMapping, Mapping> { @Override public AdaptedMapping marshal(Mapping mapping) throws Exception { try { return new AdaptedMapping(mapping); } catch (Exception e) { e.printStackTrace(); throw e; } }  @Override AdaptedMapping marshal(Mapping mapping); @Override Mapping unmarshal(AdaptedMapping adapted); }
JmsMappingAdapter extends XmlAdapter<JmsMappingAdapter.AdaptedMapping, Mapping> { @Override public AdaptedMapping marshal(Mapping mapping) throws Exception { try { return new AdaptedMapping(mapping); } catch (Exception e) { e.printStackTrace(); throw e; } }  @Override AdaptedMapping marshal(Mapping mapping); @Override Mapping unmarshal(AdaptedMapping adapted);  }