@Deprecated
  public String javaUnbox(Schema schema) {
    return javaUnbox(schema, false);
  }
@Test
  void javaUnbox() throws Exception {
    SpecificCompiler compiler = createCompiler();
    compiler.setEnableDecimalLogicalType(false);

    Schema intSchema = Schema.create(Schema.Type.INT);
    Schema longSchema = Schema.create(Schema.Type.LONG);
    Schema floatSchema = Schema.create(Schema.Type.FLOAT);
    Schema doubleSchema = Schema.create(Schema.Type.DOUBLE);
    Schema boolSchema = Schema.create(Schema.Type.BOOLEAN);
    assertEquals("int", compiler.javaUnbox(intSchema, false), "Should use int for Type.INT");
    assertEquals("long", compiler.javaUnbox(longSchema, false), "Should use long for Type.LONG");
    assertEquals("float", compiler.javaUnbox(floatSchema, false), "Should use float for Type.FLOAT");
    assertEquals("double", compiler.javaUnbox(doubleSchema, false), "Should use double for Type.DOUBLE");
    assertEquals("boolean", compiler.javaUnbox(boolSchema, false), "Should use boolean for Type.BOOLEAN");

    // see AVRO-2569
    Schema nullSchema = Schema.create(Schema.Type.NULL);
    assertEquals("void", compiler.javaUnbox(nullSchema, true), "Should use void for Type.NULL");

    Schema dateSchema = LogicalTypes.date().addToSchema(Schema.create(Schema.Type.INT));
    Schema timeSchema = LogicalTypes.timeMillis().addToSchema(Schema.create(Schema.Type.INT));
    Schema timestampSchema = LogicalTypes.timestampMillis().addToSchema(Schema.create(Schema.Type.LONG));
    // Date/time types should always use upper level java classes, even though
    // their underlying representations are primitive types
    assertEquals("java.time.LocalDate", compiler.javaUnbox(dateSchema, false), "Should use LocalDate for date type");
    assertEquals("java.time.LocalTime", compiler.javaUnbox(timeSchema, false),
        "Should use LocalTime for time-millis type");
    assertEquals("java.time.Instant", compiler.javaUnbox(timestampSchema, false),
        "Should use DateTime for timestamp-millis type");
  }