@Test
public void testIdlGenerator2() throws IOException, ParseException {

  StringWriter idlStrWriter = new StringWriter();
  Schema rs = SchemaBuilder.builder().record("TestRecord2")
          .namespace("test")
          .doc("record doc")
          .aliases("recordAlias")
          .prop("propKey", "propVal")
          .fields()
          .requiredBoolean("isThere")
          .nullableString("strField", null)
          .endRecord();
  SchemaUtils.writeIdlProtocol("TestProtocol", "test", idlStrWriter, rs);
  LOG.debug("writer = {}", idlStrWriter);
  String idlStr = idlStrWriter.toString();
  Assert.assertFalse(idlStr.isEmpty());
  Idl idl = new Idl(new StringReader(idlStr));
  idl.setSource("");
  Protocol protocol = idl.CompilationUnit();
  LOG.debug("Protocol = {}", protocol);
  Schema rs2 = protocol.getType("test.TestRecord2");
  Assert.assertEquals(rs, rs2);
}