@Test
public void testEncode() {

  String[] array = {"foo", "bar"};
  byte[] expected = {0, 0, 0, 2, 0, 0, 0, 3, 'f', 'o', 'o', 0, 0, 0, 3, 'b', 'a', 'r'};
  assertArrayEquals(expected, adapter.serialize(array));
}