HmlUtils { public static SymbolList toDnaSymbolList(final Sequence sequence) throws IllegalSymbolException { checkNotNull(sequence); return DNATools.createDNA(sequence.getValue().replaceAll("\\s+", "")); } private  HmlUtils(); static Sequence createSequence(final org.biojava.bio.seq.Sequence sequence); static Iterable<Sequence> createSequences(final BufferedReader reader); static Iterable<Sequence> createSequences(final File file); static Iterable<Sequence> createSequences(final URL url); static Iterable<Sequence> createSequences(final InputStream inputStream); static Hmlid getHmlid(final Hml hml); static SymbolList toDnaSymbolList(final Sequence sequence);  }
@Test(expected=NullPointerException.class) public void testToDnaSymbolListNullSequence() throws Exception { toDnaSymbolList(null); }
@Test(expected=IllegalSymbolException.class) public void testToDnaSymbolListIllegalSymbol() throws Exception { Sequence sequence = new Sequence(); sequence.setValue("1234"); toDnaSymbolList(sequence); }
@Test public void testToDnaSymbolList() throws Exception { Sequence sequence = new Sequence(); sequence.setValue("actg"); assertEquals("actg", toDnaSymbolList(sequence).seqString()); }
@Test public void testToDnaSymbolListWhitespace() throws Exception { Sequence sequence = new Sequence(); sequence.setValue("\t\n a c\t\nt g\t\n"); assertEquals("actg", toDnaSymbolList(sequence).seqString()); }