### Question:
NMEA { public static final MessageType getMessageType(CharSequence seq) { if (!isNMEAOrAIS(seq)) { return null; } if (CharSequences.startsWith(seq, "$P")) { return null; } return MessageType.valueOf(seq.subSequence(3, 6).toString()); }  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 testGetMessageType() { assertEquals(VDM, NMEA.getMessageType("!AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23\r\n")); assertNull(NMEA.getMessageType("$PICOA,08,90,TXF,*1F\r\n")); }