@Test
  public void canSerializeNullableLists() throws SerDeException, IOException {
    List<Integer> intList = new ArrayList<Integer>();
    Collections.addAll(intList, 1,2, 3);
    String field = "{ \"name\":\"nullableList\", \"type\": [\"null\", " +
            "{\"type\":\"array\", \"items\":\"int\"}] }";
    GenericRecord r = serializeAndDeserialize(field, "nullableList", intList);
    Object result = r.get("nullableList");
    assertNotSame(intList, result);
    assertEquals(intList, result);

    r = serializeAndDeserialize(field, "nullableList", null);
    assertNull(r.get("nullableList"));
  }
Verify that we can serialize an avro value by taking one, running it through
the deser process and then serialize it again.
serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroSerializer.java