### Question:
ChordMelodyDecoder { public String getKey(String encoded){ String encodedKey = encoded.split("\\^")[0]; return getNoteName(encodedKey); } ChordMelodyDecoder(Config config); String extractValidChords(String seq); List<String> extractChordPredictionToArray(String chordPrediction); String extractValidMelody(String seq); String decodeChords(String encoded); String decodeBassline(String encoded); String getJChordName(String encodedChord); String getChordType(String chordCode); String decodeMelody(String encoded, String key); String extractDuration(int duration); String getNoteName(String encoded); String encodeNoteName(String encoded); String encodeChordType(String chordType); String getKey(String encoded); static String INVALID; }### Answer:
@Test public void shouldExtractKey(){ ChordMelodyDecoder chordMelodyDecoder = new ChordMelodyDecoder(new Config(false)); String key = chordMelodyDecoder.getKey(validA); Assert.assertEquals("a", key); }