package org.biojava.nbio.core.sequence;

import static org.junit.jupiter.api.Assertions.*;

class RNASequenceTest {

}
@@ -45,74 +45,2885 @@
 ort 
-static org.junit.jupiter.api.Assertions.*;%0A%0Aclass RNASequenceTest %7B
+org.biojava.nbio.core.exceptions.CompoundNotFoundException;%0Aimport org.biojava.nbio.core.sequence.compound.NucleotideCompound;%0Aimport org.biojava.nbio.core.sequence.template.Compound;%0Aimport org.biojava.nbio.core.sequence.template.SequenceView;%0Aimport org.biojava.nbio.core.sequence.transcription.TranscriptionEngine;%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.Test;%0Aimport static java.util.stream.Collectors.joining;%0Aimport static org.junit.jupiter.api.Assertions.*;%0A%0Aclass RNASequenceTest %7B%0A%0A    // AUG start, then 3 AA, then stop codon%0A    final String rnaSeq    = %22AUGGUCGAACUCUGA%22;%0A    final String rnaSeqCompl = %22UACCAGCUUGAGACU%22;%0A    final String rnaSeqReversed = %22AGUCUCAAGCUGGUA%22;%0A    final String rnaSeqReversedComplement = %22UCAGAGUUCGACCAU%22;%0A    RNASequence rna;%0A    @BeforeEach%0A    void before() throws CompoundNotFoundException %7B%0A        rna = new RNASequence(rnaSeq);%0A    %7D%0A%0A    @Test%0A    void translateToProteinSequence()  %7B%0A        ProteinSequence protein =  rna.getProteinSequence(TranscriptionEngine.getDefault());%0A        assertEquals(4, protein.getLength());%0A        assertEquals(%22MVEL%22, protein.getSequenceAsString());%0A    %7D%0A%0A    @Test%0A    void complement()  %7B%0A        SequenceView%3CNucleotideCompound%3E complement = rna.getComplement();%0A        assertEquals(rnaSeqCompl, complement.getSequenceAsString());%0A        assertEquals(rnaSeq, complement.getViewedSequence().getSequenceAsString());%0A        assertEquals(rna.getLength(), complement.getLength());%0A    %7D%0A%0A    @Test%0A    void reverse()  %7B%0A        SequenceView%3CNucleotideCompound%3E reversed = rna.getInverse();%0A        assertEquals(rnaSeqReversed, reversed.getSequenceAsString());%0A        assertEquals(rnaSeq, reversed.getViewedSequence().getSequenceAsString());%0A        assertEquals(rna.getLength(), reversed.getLength());%0A    %7D%0A%0A    @Test%0A    void reverseComplement()  %7B%0A        SequenceView%3CNucleotideCompound%3E reverseComplement = rna.getReverseComplement();%0A        assertEquals(rnaSeqReversedComplement, reverseComplement.getSequenceAsString());%0A        assertEquals(rna.getLength(), reverseComplement.getLength());%0A        StringBuilder sb = new StringBuilder();%0A        for (int i = 1; i %3C= rna.getLength(); i++) %7B%0A            sb.append(reverseComplement.getCompoundAt(i).toString());%0A        %7D%0A        assertEquals(rnaSeqReversedComplement, sb.toString());%0A%0A        sb = new StringBuilder();%0A        for (Compound c: reverseComplement) %7B%0A            sb.append(c.toString());%0A        %7D%0A        assertEquals(rnaSeqReversedComplement, sb.toString());%0A        assertEquals(rnaSeqReversedComplement, reverseComplement.getAsList().stream().map(Compound::toString).collect(joining(%22%22)));%0A    %7D%0A%0A    @Test%0A    void rejectThymineInSequence()  %7B%0A        String dna = rnaSeq.replaceAll(%22U%22, %22T%22);%0A        assertThrows(CompoundNotFoundException.class, ()-%3Enew RNASequence(dna));%0A    %7D
 %0A%0A%7D

tidy up RNASeqTest