public static void writeNullTerminated(byte[] data, ByteArrayOutputStream out) throws IOException {
        out.write(data);
        out.write(MSC.NULL_TERMINATED_STRING_DELIMITER);
    }
@Test
	public void testWriteNullTerminated() throws IOException {
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		ByteHelper.writeNullTerminated(new byte[] {3}, out);

		Assert.assertArrayEquals(new byte[] {3, 0}, out.toByteArray());
	}