@Test
public void testEncode() {

  final boolean[] array = {true, false, true, false};
  final byte[] expected = {
      0, 0, 0, 4,
      1, 0, 1, 0
  };
  final byte[] serialized = adapter.serialize(array);
  assertArrayEquals(expected, serialized);
}