@Test
  public void canSerializeEnums() throws SerDeException, IOException {
    String type = "{\"type\": \"enum\", \"name\": \"enum1_values\", " +
            "\"symbols\":[\"BLUE\",\"RED\",\"GREEN\"]}";
    Schema schema = AvroSerdeUtils.getSchemaFor(type);
    String field = "{ \"name\":\"enum1\", \"type\": " + schema + " }";
    for(enum1 e : enum1.values()) {
      GenericEnumSymbol symbol = new GenericData.EnumSymbol(schema, e.toString());
      GenericRecord r = serializeAndDeserialize(field, "enum1", symbol);

      assertEquals(e, enum1.valueOf(r.get("enum1").toString()));
    }

  }
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