mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestPersistence.java
public void testMarhsalledFile() 
        throws JAXBException, IllegalArgumentException, PersistenceFailedException, ValidationFailedException
    {
        File outputFile = m_Context.getDataFile("test.xml");
        
        final Observation observation = createObservation();
        m_ObservationStore.persist(observation);
        m_ObservationStore.remove(observation.getUuid());
        
        JAXBContext context = JAXBContext.newInstance(Observation.class);
        Marshaller marshaller = context.createMarshaller();
        marshaller.marshal(observation, outputFile);
        
        Unmarshaller unmarshaller = context.createUnmarshaller();
        Observation marshalledObservation = (Observation)unmarshaller.unmarshal(outputFile);
        m_ObservationStore.persist(marshalledObservation);
        m_ObservationStore.remove(observation.getUuid());
    }
/**
     * This test will verify that an observation that has been persisted can be marshalled to XML and then unmarshalled
     * back into an object and still be valid.  Basically ensures the marshalling actually generates valid XML data.
     */
This test will verify that an observation that has been persisted can be marshalled to XML and then unmarshalled
back into an object and still be valid.  Basically ensures the marshalling actually generates valid XML data.
This test will verify that an observation that has been persisted can be marshalled to XML and then unmarshalled back into an object and still be valid . Basically ensures the marshalling actually generates valid XML data .
public void testMarhsalledFile() 
        throws JAXBException, IllegalArgumentException, PersistenceFailedException, ValidationFailedException
    {
        File outputFile = m_Context.getDataFile("test.xml");
        final Observation observation = createObservation();
        m_ObservationStore.persist(observation);
        m_ObservationStore.remove(observation.getUuid());
        JAXBContext context = JAXBContext.newInstance(Observation.class);
        Marshaller marshaller = context.createMarshaller();
        marshaller.marshal(observation, outputFile);
        Unmarshaller unmarshaller = context.createUnmarshaller();
        Observation marshalledObservation = (Observation)unmarshaller.unmarshal(outputFile);
        m_ObservationStore.persist(marshalledObservation);
        m_ObservationStore.remove(observation.getUuid());
    }
public void testMarhsalledFile ( ) throws JAXBException , IllegalArgumentException , PersistenceFailedException , ValidationFailedException { File outputFile = m_Context . getDataFile ( "test.xml" ) ; final Observation observation = createObservation ( ) ; m_ObservationStore . persist ( observation ) ; m_ObservationStore . remove ( observation . getUuid ( ) ) ; JAXBContext context = JAXBContext . newInstance ( Observation . class ) ; Marshaller marshaller = context . createMarshaller ( ) ; marshaller . marshal ( observation , outputFile ) ; Unmarshaller unmarshaller = context . createUnmarshaller ( ) ; Observation marshalledObservation = ( Observation ) unmarshaller . unmarshal ( outputFile ) ; m_ObservationStore . persist ( marshalledObservation ) ; m_ObservationStore . remove ( observation . getUuid ( ) ) ; }
This test will verify that an observation that has been persisted can be marshalled to XML and then unmarshalled
 back into an object and still be valid.
This test will verify that an observation that has been persisted can be marshalled to XML and then unmarshalled back into an object and still be valid .