package test.castor; import static org.junit.Assert.assertTrue; import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import org.exolab.castor.xml.Marshaller; import org.junit.Test; public class IteratorMarshallTest { @Test public void testMarshallIterator() { Writer writer = null; try { writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream( "temp.xml"))); final DomainClass dc = new DomainClass(); final Marshaller marshaller = new Marshaller(writer); marshaller.marshal(dc); assertTrue(true); } catch (final Exception e) { e.printStackTrace(); } finally { try { if (writer != null) { writer.close(); } } catch (final IOException e) { // do nothing } } } }