private JsonDecoder(Symbol root, InputStream in) throws IOException {
    super(root);
    configure(in);
  }
@Test
  void testIntWithError() throws IOException {
    Schema schema = SchemaBuilder.builder("test").record("example").fields().requiredInt("id").endRecord();
    String record = "{ \"id\": -1.2 }";

    GenericDatumReader<GenericRecord> reader = new GenericDatumReader<>(schema, schema);
    JsonDecoder decoder = DecoderFactory.get().jsonDecoder(schema, record);
    Assertions.assertThrows(AvroTypeException.class, () -> reader.read(null, decoder));
  }