VloConfigMarshaller { public final void marshal(VloConfig config, Result result) throws JAXBException { final Marshaller marshaller = jc.createMarshaller(); marshaller.marshal(config, result); } VloConfigMarshaller(); final void marshal(VloConfig config, Result result); final VloConfig unmarshal(Source source);  }
@Test public void testMarshal() throws Exception { final VloConfig config = new VloConfig(); config.setSolrUrl("http: config.setDataRoots(Arrays.asList(new DataRoot("originName", new File("rootFile"), "prefix", "toStrip", Boolean.FALSE))); config.setFacetFieldKeys(Arrays.asList("collection", "country", "continent")); config.setAvailabilityValues(Arrays.asList( new FieldValueDescriptor("PUB", "Public", "Description for public"), new FieldValueDescriptor("ACA", "Academic", "Description for academic") )); final StringWriter sw = new StringWriter(); instance.marshal(config, new StreamResult(sw)); logger.debug(sw.toString()); }