@Test
public void testReadNullTerminatedStringWithoutEndingNull() {

  byte[] bytes = new byte[] {
      'f', 'o', 'o', 0, 'b', 'a', 'r'
  };
  ParsableByteArray parser = new ParsableByteArray(bytes);
  assertThat(parser.readNullTerminatedString()).isEqualTo("foo");
  assertThat(parser.readNullTerminatedString()).isEqualTo("bar");
  assertThat(parser.readNullTerminatedString()).isNull();
}