}
@Test
public void testParse() throws FalconException, JAXBException {
Process process = parser.parseAndValidate(getClass().getResourceAsStream(PROCESS_XML));
Assert.assertNotNull(process);
Assert.assertEquals(process.getName(), "sample");
Assert.assertEquals(process.getParallel(), 1);
Assert.assertEquals(process.getOrder().name(), "LIFO");
Assert.assertEquals(process.getFrequency().toString(), "hours(1)");
Assert.assertEquals(process.getEntityType(), EntityType.PROCESS);
Assert.assertEquals(process.getInputs().getInputs().get(0).getName(), "impression");
Assert.assertEquals(process.getInputs().getInputs().get(0).getFeed(), "impressionFeed");
Assert.assertEquals(process.getInputs().getInputs().get(0).getStart(), "today(0,0)");
Assert.assertEquals(process.getInputs().getInputs().get(0).getEnd(), "today(2,0)");
Assert.assertEquals(process.getInputs().getInputs().get(0).getPartition(), "*/US");
Assert.assertEquals(process.getInputs().getInputs().get(0).isOptional(), false);
Assert.assertEquals(process.getOutputs().getOutputs().get(0).getName(), "impOutput");
Assert.assertEquals(process.getOutputs().getOutputs().get(0).getFeed(), "imp-click-join1");
Assert.assertEquals(process.getOutputs().getOutputs().get(0).getInstance(), "today(0,0)");
Assert.assertEquals(process.getProperties().getProperties().get(0).getName(), "name1");
Assert.assertEquals(process.getProperties().getProperties().get(0).getValue(), "value1");
Cluster processCluster = process.getClusters().getClusters().get(0);
Assert.assertEquals(SchemaHelper.formatDateUTC(processCluster.getValidity().getStart()), "2011-11-02T00:00Z");
Assert.assertEquals(SchemaHelper.formatDateUTC(processCluster.getValidity().getEnd()), "2011-12-30T00:00Z");
Assert.assertEquals(process.getTimezone().getID(), "UTC");
Assert.assertEquals(process.getWorkflow().getEngine().name().toLowerCase(), "oozie");
Assert.assertEquals(process.getWorkflow().getPath(), "/path/to/workflow");
StringWriter stringWriter = new StringWriter();
Marshaller marshaller = EntityType.PROCESS.getMarshaller();
marshaller.marshal(process, stringWriter);
System.out.println(stringWriter.toString());