Example3: Write a multi FASTA file

	/**
	 * Test method for
	 * {@link net.sf.jfasta.impl.FASTAFileWriter#write(net.sf.jfasta.FASTAElement)}
	 * .
	 * 
	 * @throws IOException
	 */
	@Test
	public final void testExample03() throws IOException {

		// Write a FASTA file element by element

		FASTAElement e1 = new FASTAElementImpl("header", "seq");
		FASTAElement e2 = new FASTAElementImpl("header2", "seq2");
		FASTAElement e3 = new FASTAElementImpl("head", "atgc");

		List<FASTAElement> elements = Arrays.asList(e1, e2, e3);

		FASTAFileWriter writer = new FASTAFileWriter(out);

		for (FASTAElement e : elements) {
			writer.write(e);
		}
		writer.close();

		assertEquals(new FASTAFileImpl(elements).toString()
				+ UtilIO.NEW_LINE_STRING, out.toString());
	}

Example4: Write a multi FASTA file

	/**
	 * Test method for
	 * {@link net.sf.jfasta.impl.FASTAFileWriter#write(net.sf.jfasta.FASTAElement)}
	 * .
	 * 
	 * @throws IOException
	 */
	@Test
	public final void testExample04() throws IOException {

		// Write a FASTA file at once

		FASTAElement e1 = new FASTAElementImpl("header", "seq");
		FASTAElement e2 = new FASTAElementImpl("header2", "seq2");
		FASTAElement e3 = new FASTAElementImpl("head", "atgc");

		FASTAFile file = new FASTAFileImpl(Arrays.asList(e1, e2, e3));

		FASTAFileWriter writer = new FASTAFileWriter(out);

		writer.write(file);

		writer.close();

		assertEquals(file.toString() + UtilIO.NEW_LINE_STRING, out.toString());
	}