@Test
public void testPrimitiveSchema()
{
for (Map.Entry<DataSchema.Type, Class<?>> entry: _dataSchemaTypeToPrimitiveJavaTypeMap.entrySet())
{
final PrimitiveDataSchema schema = DataSchemaUtil.dataSchemaTypeToPrimitiveDataSchema(entry.getKey());
final Object value = SchemaSampleDataGenerator.buildData(schema, _spec);
Assert.assertSame(value.getClass(), entry.getValue());
}
final PrimitiveDataSchema nullSchema = DataSchemaConstants.NULL_DATA_SCHEMA;
final Object nullData = SchemaSampleDataGenerator.buildData(nullSchema, _spec);
Assert.assertEquals(nullData, Data.NULL);
}