@Test
public void testEncode() {

  byte[] array = {1, 2, 3, 4, 0x7F, (byte) 0x80, (byte) 0xFF};
  byte[] expected = {0, 0, 0, 7, 1, 2, 3, 4, 0x7F, (byte) 0x80, (byte) 0xFF};
  assertArrayEquals(expected, adapter.serialize(array));
}