### Question:
JMXScript { public List<Object> getTasks() { return tasks; }  List<Object> getTasks();  }### Answer:
@Test public void testWrite() throws JAXBException { JMXInvoke invoke = new JMXInvoke("com.bagri.db:type=Schema,name=default,kind=ModelManagement", "registerSchema", null, null); invoke.addArgument("java.lang.String", "../../etc/samples/tpox/security.xsd"); JMXScript script = new JMXScript(); script.getTasks().add(invoke); script.getTasks().add(5000); invoke = new JMXInvoke("com.bagri.db:type=Schema,name=default,kind=IndexManagement", "addIndex", null, null); invoke.addArgument("java.lang.String", "IDX_Customer_id"); invoke.addArgument("java.lang.String", "/{http: invoke.addArgument("java.lang.String", "/{http: invoke.addArgument("boolean", "true"); invoke.addArgument("java.lang.String", "Customer id"); script.getTasks().add(invoke); JAXBContext jc = JAXBContext.newInstance(JMXScript.class); Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(script, System.out); }