@@ -0,0 +1,2148 @@
+package org.biojava.nbio.core;%0A%0Aimport junit.framework.TestCase;%0Aimport org.biojava.nbio.core.exceptions.CompoundNotFoundException;%0Aimport org.biojava.nbio.core.sequence.DNASequence;%0Aimport org.biojava.nbio.core.sequence.RNASequence;%0Aimport org.biojava.nbio.core.sequence.compound.AmbiguityDNACompoundSet;%0Aimport org.biojava.nbio.core.sequence.compound.AmbiguityRNACompoundSet;%0Aimport org.biojava.nbio.core.sequence.compound.NucleotideCompound;%0Aimport org.biojava.nbio.core.sequence.io.RNASequenceCreator;%0Aimport org.biojava.nbio.core.sequence.template.Compound;%0Aimport org.biojava.nbio.core.sequence.template.CompoundSet;%0Aimport org.biojava.nbio.core.sequence.template.Sequence;%0Aimport org.biojava.nbio.core.sequence.transcription.DNAToRNATranslator;%0Aimport org.junit.Test;%0A%0A/**%0A * A Test case for https://github.com/biojava/biojava/issues/344%0A *%0A * Created by andreas on 12/4/15.%0A */%0A%0Apublic class TestAmbiguityCompoundSet extends TestCase%7B%0A%0A    @Test%0A    public void testCompountSet()%7B%0A        try %7B%0A%0A            CompoundSet%3CNucleotideCompound%3E dnaSet = AmbiguityDNACompoundSet.getDNACompoundSet();%0A            CompoundSet%3CNucleotideCompound%3E rnaSet = AmbiguityRNACompoundSet.getRNACompoundSet();%0A%0A            DNASequence dna=new DNASequence(%22AGTCS%22, dnaSet);%0A%0A            assertEquals(%22AGTCS%22,dna.toString());%0A%0A            RNASequence rna = dna.getRNASequence();%0A%0A            rna = new RNASequence(dna.getSequenceAsString().replaceAll(%22T%22, %22U%22), AmbiguityRNACompoundSet.getRNACompoundSet()); //fails with missing compound S%0A%0A            assertEquals(%22AGUCS%22,rna.toString());%0A%0A            /** now, do the translation also using the underlying API (should not be needed for a user)%0A             *%0A             */%0A            DNAToRNATranslator translator = new DNAToRNATranslator(new RNASequenceCreator(rnaSet%0A                    ),dnaSet,rnaSet,false);%0A%0A            Sequence%3CNucleotideCompound%3E translated = translator.createSequence(dna);%0A%0A            assertEquals(%22AGUCS%22, translated.toString());%0A            %0A        %7D catch (CompoundNotFoundException e) %7B%0A            e.printStackTrace();%0A            fail(e.getMessage());%0A        %7D%0A    %7D%0A%7D%0A

test case for #344