public static DataMap dataSchemaToDataMap(NamedDataSchema schema)
  {
    String inputSchemaAsString = schema.toString();
    try
    {
      JacksonDataCodec codec = new JacksonDataCodec();
      DataMap schemaAsDataMap = codec.stringToMap(inputSchemaAsString);
      return schemaAsDataMap;
    }
    catch (IOException e)
    {
      // This should never occur.
      // UTF-8 encoding should always be valid for getBytes
      // codec.readMap from JSON generated from a schema should always be successful.
      throw new IllegalStateException(UNEXPECTED_IOEXCEPTION + inputSchemaAsString, e);
    }
  }
@Test
  public void testConvertDataSchemaToDataMap() throws IOException
  {
    for (String good : goodInputs)
    {
      NamedDataSchema dataSchema = (NamedDataSchema) TestUtil.dataSchemaFromString(good);

      DataMap mapFromSchema = Conversions.dataSchemaToDataMap(dataSchema);
      DataMap mapFromString = TestUtil.dataMapFromString(good);

      assertEquals(mapFromSchema, mapFromString);
    }
  }