### Question:
NmeaUtil { public static String createTagBlock(LinkedHashMap<String, String> tags) { if (tags == null || tags.size() == 0) return ""; StringBuilder s = new StringBuilder(128); s.append("\\"); int startChecksum = s.length(); boolean first = true; for (Entry<String, String> entry : tags.entrySet()) { if (!first) s.append(","); s.append(entry.getKey()); s.append(":"); s.append(entry.getValue()); first = false; } String checksum = NmeaUtil.getChecksum(s.substring(startChecksum)); s.append("*"); s.append(checksum); s.append("\\"); return s.toString(); } 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 testCreationOfTagBlock() { String tag = "\\g:1-2-1536,c:1334258609*2F\\"; LinkedHashMap<String, String> tags = createSampleTags(); assertEquals(tag, NmeaUtil.createTagBlock(tags)); }