Configure extends AbstractCommandLineTool { public void marshal(ParameterFile data, OutputStream outputStream) { try { Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(data, outputStream); } catch (final JAXBException e) { throw new RuntimeException(e); } } Configure(); static void printUsage(); static void main(String[] args); void setParameterFile(String parameterFile); void setProcessFile(String processFile); void setReadParameter(boolean readParameter); void setExitOnError(boolean exitOnError); void marshal(ParameterFile data, OutputStream outputStream); ParameterFile unmarshal(InputStream inputStream); @Override void run(); void writeParameter(); void processFile(Path file);  }
@Test void test_marshal() { final ParameterFile list = new ParameterFile(); list.getParameter().add(new Parameter("param1", "param2", "param3", null)); list.getParameter().add(new Parameter("param4", "param5", "param6", "A")); final Configure configure = new Configure(); configure.marshal(list, System.out); }