@@ -0,0 +1,1273 @@
+package com.cisco.cta.taxii.adapter.persistence;%0A%0Aimport static org.hamcrest.CoreMatchers.not;%0Aimport static org.hamcrest.CoreMatchers.sameInstance;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.*;%0A%0Aimport java.io.File;%0A%0Aimport javax.xml.datatype.DatatypeFactory;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0A%0Apublic class SimpleFileHandlerTest %7B%0A%0A    private TaxiiStatusFileHandler handler;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        PersistenceConfiguration factory = new PersistenceConfiguration();%0A        handler = new SimpleFileHandler(new File(%22target/SimpleFileHandlerTest.data%22), factory.taxiiStatusMarshaller());%0A    %7D%0A%0A    @Test%0A    public void saveLoad() throws Exception %7B%0A        // write%0A        TaxiiStatus writeRoot = new TaxiiStatus();%0A        TaxiiStatus.Feed feed = new TaxiiStatus.Feed();%0A        feed.setName(%22my%22);%0A        feed.setLastUpdate(DatatypeFactory.newInstance().newXMLGregorianCalendar(%222000-01-02T03:04:05.006+07:00%22));%0A        writeRoot.getFeed().add(feed);%0A        handler.save(writeRoot);%0A        %0A        //read%0A        TaxiiStatus readRoot = handler.load();%0A        assertThat(writeRoot, not(sameInstance(readRoot)));%0A        assertThat(readRoot.getFeed().get(0), is(feed));%0A    %7D%0A%7D%0A

test the new file handler