### Question:
NMEA { public static final CharSequence findMessage(CharSequence seq) { int begin = CharSequences.indexOf(seq, (c)->c=='$'||c=='!'); if (begin == -1) { return null; } int end = CharSequences.indexOf(seq, "\r\n", begin+1); if (end != -1) { return seq.subSequence(begin, end+2); } return null; }  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 testFindMessage() { String exp = "!AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23\r\n"; assertEquals(exp, NMEA.findMessage(exp)); assertEquals(exp, NMEA.findMessage("*63\r\n!AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23\r\n$PICOA,08,90,TXF,*1F\r\n")); }