Collection<OutputFile> compile() {
    List<OutputFile> out = new ArrayList<>(queue.size() + 1);
    for (Schema schema : queue) {
      out.add(compile(schema));
    }
    if (protocol != null) {
      out.add(compileInterface(protocol));
    }
    return out;
  }
@Test
  void fieldWithUnderscore_avro3826() {
    String jsonSchema = "{\n" + "  \"name\": \"Value\",\n" + "  \"type\": \"record\",\n" + "  \"fields\": [\n"
        + "    { \"name\": \"__deleted\",  \"type\": \"string\"\n" + "    }\n" + "  ]\n" + "}";
    Collection<SpecificCompiler.OutputFile> outputs = new SpecificCompiler(new Schema.Parser().parse(jsonSchema))
        .compile();
    assertEquals(1, outputs.size());
    SpecificCompiler.OutputFile outputFile = outputs.iterator().next();
    assertTrue(outputFile.contents.contains("getDeleted()"));
    assertFalse(outputFile.contents.contains("$0"));
    assertFalse(outputFile.contents.contains("$1"));

    String jsonSchema2 = "{\n" + "  \"name\": \"Value\",  \"type\": \"record\",\n" + "  \"fields\": [\n"
        + "    { \"name\": \"__deleted\",  \"type\": \"string\"},\n"
        + "    { \"name\": \"_deleted\",  \"type\": \"string\"}\n" + "  ]\n" + "}";
    Collection<SpecificCompiler.OutputFile> outputs2 = new SpecificCompiler(new Schema.Parser().parse(jsonSchema2))
        .compile();
    assertEquals(1, outputs2.size());
    SpecificCompiler.OutputFile outputFile2 = outputs2.iterator().next();

    assertTrue(outputFile2.contents.contains("getDeleted()"));
    assertTrue(outputFile2.contents.contains("getDeleted$0()"));
    assertFalse(outputFile.contents.contains("$1"));

    String jsonSchema3 = "{\n" + "  \"name\": \"Value\",  \"type\": \"record\",\n" + "  \"fields\": [\n"
        + "    { \"name\": \"__deleted\",  \"type\": \"string\"},\n"
        + "    { \"name\": \"_deleted\",  \"type\": \"string\"},\n"
        + "    { \"name\": \"deleted\",  \"type\": \"string\"}\n" + "  ]\n" + "}";
    Collection<SpecificCompiler.OutputFile> outputs3 = new SpecificCompiler(new Schema.Parser().parse(jsonSchema3))
        .compile();
    assertEquals(1, outputs3.size());
    SpecificCompiler.OutputFile outputFile3 = outputs3.iterator().next();

    assertTrue(outputFile3.contents.contains("getDeleted()"));
    assertTrue(outputFile3.contents.contains("getDeleted$0()"));
    assertTrue(outputFile3.contents.contains("getDeleted$1()"));
    assertFalse(outputFile3.contents.contains("$2"));

    String jsonSchema4 = "{\n" + "  \"name\": \"Value\",  \"type\": \"record\",\n" + "  \"fields\": [\n"
        + "    { \"name\": \"__deleted\",  \"type\": \"string\"},\n"
        + "    { \"name\": \"_deleted\",  \"type\": \"string\"},\n"
        + "    { \"name\": \"deleted\",  \"type\": \"string\"},\n"
        + "    { \"name\": \"Deleted\",  \"type\": \"string\"}\n" + "  ]\n" + "}";
    Collection<SpecificCompiler.OutputFile> outputs4 = new SpecificCompiler(new Schema.Parser().parse(jsonSchema4))
        .compile();
    assertEquals(1, outputs4.size());
    SpecificCompiler.OutputFile outputFile4 = outputs4.iterator().next();

    assertTrue(outputFile4.contents.contains("getDeleted()"));
    assertTrue(outputFile4.contents.contains("getDeleted$0()"));
    assertTrue(outputFile4.contents.contains("getDeleted$1()"));
    assertTrue(outputFile4.contents.contains("getDeleted$2()"));
    assertFalse(outputFile4.contents.contains("$3"));
  }