### Question:
HeaderParser { protected static String parseHeaderString(byte[] b, int off) { int len = b[off+2] & 0xFF; StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { sb.append((char) b[off + 4 + i*2]); } return sb.toString(); }  static CustomHeader parse(File map); static CustomHeader parse(byte[] map); static CustomHeader parse(ByteSource source); static int findEndOfHeader(ByteSource source);  }### Answer:
@Test public void parseHeaderString() throws Exception { String expected = "test"; byte[] converted = CustomHeader.formatHeaderString(expected); String actual = HeaderParser.parseHeaderString(converted, 0); assertEquals(expected, actual); }
@Test public void parseHeaderString2() throws Exception { String expected = "PlayerData"; String actual = HeaderParser.parseHeaderString(inputString, 2); assertEquals(expected, actual); }