import java.util.List;
import java.util.Map;
import java.util.Set;

class ProteinTranslator {
	// Codon                 | Protein
	// :---                  | :---
	// AUG                   | Methionine
	// UUU, UUC              | Phenylalanine
	// UUA, UUG              | Leucine
	// UCU, UCC, UCA, UCG    | Serine
	// UAU, UAC              | Tyrosine
	// UGU, UGC              | Cysteine
	// UGG                   | Tryptophan
	// UAA, UAG, UGA         | STOP
	private static final Map<String, String> CODON_TO_PROTEIN = Map.ofEntries(
		Map.entry("AUG", "Methionine"),
		Map.entry("UUU", "Phenylalanine"),
		Map.entry("UUC", "Phenylalanine"),
		Map.entry("UUA", "Leucine"),
		Map.entry("UUG", "Leucine"),
		Map.entry("UCU", "Serine"),
		Map.entry("UCC", "Serine"),
		Map.entry("UCA", "Serine"),
		Map.entry("UCG", "Serine"),
		Map.entry("UAU", "Tyrosine"),
		Map.entry("UAC", "Tyrosine"),
		Map.entry("UGU", "Cysteine"),
		Map.entry("UGC", "Cysteine"),
		Map.entry("UGG", "Tryptophan")
	);
	private static final Set<String> STOP_CODONS = Set.of("UAA", "UAG", "UGA");

    List<String> translate(String rnaSequence) {
		return List.of(CODON_TO_PROTEIN.get(rnaSequence));
    }
}

@@ -1,24 +1,52 @@
+import java.util.ArrayList;%0A
 import java.util.List;%0Ai
@@ -92,34 +92,118 @@
 et;%0A
-%0Aclass ProteinTranslator %7B
+import java.util.stream.Collectors;%0A%0Aclass ProteinTranslator %7B%0A%09private static final Integer CODON_LENGTH = 3;
 %0A%09//
@@ -1202,16 +1202,22 @@
 anslate(
+final 
 String r
@@ -1236,63 +1236,532 @@
 %7B%0A%09%09
-return List.of(CODON_TO_PROTEIN.get(rnaSequence));%0A    
+final List%3CString%3E codons = splitIntoCodons(rnaSequence);%0A%09%09return codons.stream().map(codon -%3E translateCodon(codon)).collect(Collectors.toList());%0A%09%7D%0A%0A%09List%3CString%3E splitIntoCodons(final String rnaSequence) %7B%0A%09%09final List%3CString%3E codons = new ArrayList%3C%3E();%0A%09%09for(int i = 0; i %3C rnaSequence.length(); i += CODON_LENGTH) %7B%0A%09%09%09codons.add(rnaSequence.substring(i, Math.min(rnaSequence.length(), i + CODON_LENGTH)));%0A%09%09%7D%0A%09%09return codons;%0A%09%7D%0A%0A%09String translateCodon(final String codon) %7B%0A%09%09return CODON_TO_PROTEIN.get(codon);%0A%09
 %7D%0A%7D%0A

Implement splitting into codons