Schema schm = reflectData.getSchema(A.class);
LOG.info(schm);
ReflectDatumWriter<A> writer = new ReflectDatumWriter<A>(schm);
ByteArrayOutputStream out = new ByteArrayOutputStream();
JsonEncoder json = EncoderFactory.get().jsonEncoder(schm, out);
writer.write(anA, json);
byte[] bs = out.toByteArray();
int len = bs.length;
LOG.info("output size: " + len);
Assert.assertEquals(0, bs.length); // This is strange!
json.flush(); // there should be a ReflectDatumWriter.flush();
bs = out.toByteArray();
dump(bs);
Assert.assertEquals(67, bs.length);
ByteArrayInputStream bais = new ByteArrayInputStream(bs);