### Question:
NmeaUtil { public static boolean isValid(String sentence) { try { return sentence.substring(sentence.lastIndexOf("*") + 1) .equalsIgnoreCase(getChecksum(sentence)); } catch (AisParseException e) { return false; } } private  NmeaUtil(); static boolean isValid(String sentence); static String getChecksum(String sentence); static String getChecksum(String sentence, boolean ignoreLeadingDollarOrExclamation); static NmeaMessage parseNmea(String line); static String insertKeyValueInTagBlock(String line, String name, String value); static String supplementWithTime(String line, long arrivalTime); static Talker getTalker(String s); static String createTagBlock(LinkedHashMap<String, String> tags); static String createNmeaLine(LinkedHashMap<String, String> tags, List<String> items);  }### Answer:
@Test public void testIsValid() { assertTrue(NmeaUtil.isValid(MESSAGE + CHECKSUM_DELIMITER + CHECKSUM)); }
@Test public void testChecksumCalculationIgnoresTagBlock() { assertTrue(NmeaUtil.isValid(TAG_BLOCK + DOLLAR + MESSAGE + CHECKSUM_DELIMITER + CHECKSUM)); }
@Test public void testIsValidNmeaWhenSentenceHasUnclosedTagBlock() { assertFalse(NmeaUtil.isValid("\\")); }