@@ -0,0 +1,1620 @@
+/**%0D%0A * %0D%0A */%0D%0Apackage org.biojava3.core.sequence.io;%0D%0A%0D%0Aimport java.io.ByteArrayInputStream;%0D%0Aimport java.io.ByteArrayOutputStream;%0D%0Aimport java.io.File;%0D%0Aimport java.util.ArrayList;%0D%0Aimport java.util.LinkedHashMap;%0D%0A%0D%0Aimport org.biojava3.core.sequence.DNASequence;%0D%0Aimport org.junit.After;%0D%0Aimport org.junit.AfterClass;%0D%0Aimport org.junit.Before;%0D%0Aimport org.junit.BeforeClass;%0D%0Aimport org.junit.Test;%0D%0A%0D%0A/**%0D%0A * @author mckeee1%0D%0A * %0D%0A */%0D%0Apublic class GenbankWriterTest %7B%0D%0A%0D%0A%09public GenbankWriterTest() %7B%7D%0D%0A%09%0D%0A%09@BeforeClass%0D%0A%09public static void setUpClass() throws Exception %7B%7D%0D%0A%0D%0A%09@AfterClass%0D%0A%09public static void tearDownClass() throws Exception %7B%7D%0D%0A%0D%0A%09@Before%0D%0A%09public void setUp() %7B%7D%0D%0A%0D%0A%09@After%0D%0A%09public void tearDown() %7B%7D%0D%0A%09%0D%0A%09@Test%0D%0A%09public void testProcess() throws Exception %7B%0D%0A%09%09File dnaFile = new File(%22src/test/resources/NM_000266.gb%22);%0D%0A%09%09LinkedHashMap%3CString, DNASequence%3E dnaSequences = GenbankReaderHelper.readGenbankDNASequence( dnaFile );%0D%0A%09%09ByteArrayOutputStream fragwriter = new ByteArrayOutputStream();%0D%0A%09%09ArrayList%3CDNASequence%3E seqs = new ArrayList%3CDNASequence%3E();%0D%0A%09%09for(DNASequence seq : dnaSequences.values()) %7B%0D%0A%09%09%09seqs.add(seq);%0D%0A%09%09%7D%0D%0A%09%09GenbankWriterHelper.writeNucleotideSequence(fragwriter, seqs,%0D%0A%09%09%09%09GenbankWriterHelper.LINEAR_DNA);%0D%0A%09%09//System.out.println(fragwriter.toString());%0D%0A%09%09ByteArrayInputStream fragreader = new ByteArrayInputStream(fragwriter.toByteArray());%0D%0A%09%09dnaSequences = GenbankReaderHelper.readGenbankDNASequence( fragreader );%0D%0A%09%09fragwriter.close();%0D%0A%09%09assert(seqs.get(0).getSequenceAsString() == dnaSequences.values().iterator().next().getSequenceAsString());%0D%0A%09%7D%0D%0A%7D%0D%0A

Add a test of the Genbank Functionality