public static GenericRecord jsonToAvroRecord(String json, String avroSchema) throws AvroTypeException, IOException {
      return jsonToAvroRecord(json, new Schema.Parser().parse(avroSchema));
   }
@Test
   void testJsonToAvroRecord() {
      String jsonText = "{\"name\":\"Laurent Broudoux\", \"email\":\"laurent@microcks.io\", \"age\":42}";

      try {
         // Load schema from file.
         Schema schema = new Schema.Parser()
               .parse(new File("target/test-classes/io/github/microcks/util/user-signedup-bad.avsc"));

         GenericRecord record = AvroUtil.jsonToAvroRecord(jsonText, schema);
         assertEquals("Laurent Broudoux", record.get("name").toString());
         assertEquals("laurent@microcks.io", record.get("email").toString());
         assertEquals(Integer.valueOf(42), Integer.valueOf(record.get("age").toString()));
      } catch (Exception e) {
         fail("Exception should not be thrown");
      }
   }