public static void writeIdlSchema(Writer writer, Schema schema) throws IOException {
    writeIdlSchemas(writer, schema.getNamespace(), singleton(schema));
  }
@Test
  public void validateHappyFlowForSingleSchema() throws IOException {
    final IdlFile idlFile = parseIdlResource("idl_utils_test_schema.avdl");
    Schema mainSchema = idlFile.getMainSchema();

    StringWriter buffer = new StringWriter();
    IdlUtils.writeIdlSchema(buffer, mainSchema.getTypes().iterator().next());

    assertEquals(getResourceAsString("idl_utils_test_schema.avdl"), buffer.toString());
  }