HmlUtils { public static Sequence createSequence(final org.biojava.bio.seq.Sequence sequence) { checkNotNull(sequence); Sequence s = new Sequence(); if (!DNATools.getDNA().equals(sequence.getAlphabet())) { throw new IllegalArgumentException("alphabet must be DNA"); } s.setValue(sequence.seqString()); return 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 testCreateSequenceNullBiojavaSequence() throws Exception { createSequence((org.biojava.bio.seq.Sequence) null); }
@Test(expected=IllegalArgumentException.class) public void testCreateSequenceInvalidBiojavaAlphabet() throws Exception { createSequence(ProteinTools.createProteinSequence("adef", "foo")); }
@Test public void testCreateSequenceBiojavaDna() throws Exception { Sequence dna = createSequence(DNATools.createDNASequence("actg", "foo")); assertEquals("actg", dna.getValue()); }
@Test(expected=IllegalArgumentException.class) public void testCreateSequenceBiojavaRna() throws Exception { createSequence(RNATools.createRNASequence("acug", "foo")); }