### Question:
NMEA { public static final CharSequence getPrefix(CharSequence seq) { if (!isNMEAOrAIS(seq)) { return null; } int idx = CharSequences.indexOf(seq, ','); if (idx == -1) { return null; } return seq.subSequence(0, idx); }  static final CharSequence getPrefix(CharSequence seq); static final CharSequence findMessage(CharSequence seq); static final TalkerId getTalkerId(CharSequence seq); static final MessageType getMessageType(CharSequence seq); static final boolean isProprietory(CharSequence seq); static final boolean isNMEA(CharSequence seq); static final boolean isAIS(CharSequence seq); static final boolean isNMEAOrAIS(CharSequence seq);  }### Answer:
@Test public void testGetPrefix() { assertEquals("!AIVDM", NMEA.getPrefix("!AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23\r\n")); assertEquals("$PICOA", NMEA.getPrefix("$PICOA,08,90,TXF,*1F\r\n")); }