public static DataMap genericRecordToDataMap(GenericRecord record, RecordDataSchema dataSchema, Schema avroSchema) throws DataTranslationException
  {
    return genericRecordToDataMap(record, dataSchema, avroSchema,null);
  }
@Test
  public void testAvroSchemaMissingFields() throws IOException
  {
    final String P_SCHEMA =
            "{" +
            "  \"type\" : \"record\",\n" +
            "  \"name\" : \"Foo\",\n" +
            "  \"fields\" : [\n" +
                    "{ \"name\": \"field1\", \"type\": \"int\" }," +
                    "{ \"name\": \"field2\", \"type\": \"int\", \"optional\": true }," +
                    "{ \"name\": \"field3\", \"type\": \"int\", \"optional\": true, \"default\": 42 }," +
                    "{ \"name\": \"field4\", \"type\": \"int\", \"default\": 42 }," +
                    "{ \"name\": \"field5\", \"type\": \"null\" }" +
              "] }";
    Schema avroSchema = Schema.parse("{ \"name\": \"foo\", \"type\": \"record\", \"fields\":[]}");
    DataMap map = DataTranslator.genericRecordToDataMap(new GenericData.Record(avroSchema), (RecordDataSchema)TestUtil.dataSchemaFromString(P_SCHEMA), avroSchema);
    assertEquals(map.size(), 0);
  }