public void testUnion()
{
check("[\"string\", \"long\"]", false);
checkDefault("[\"double\", \"long\"]", "1.1", 1.1D);
// check union json
String record = "{\"type\":\"record\",\"name\":\"Foo\",\"fields\":[]}";
String fixeda = "{\"type\":\"fixed\",\"name\":\"Bar\",\"size\": 1}";
String enu = "{\"type\":\"enum\",\"name\":\"Baz\",\"symbols\": [\"X\"]}";
Schema union = Schema.Parse("[\"null\",\"string\","
+ record + "," + enu + "," + fixeda + "]");
checkJson(union, null, "null");
//throw new NotImplementedException();
checkJson(union, "foo", "{\"string\":\"foo\"}");
//checkJson(union, new GenericData.Record(Schema.Parse(record)),
// "{\"Foo\":{}}");
//checkJson(union,
// new GenericData.Fixed(new byte[] { (byte)'a' }),
// "{\"Bar\":\"a\"}");
//checkJson(union, "X", "{\"Baz\":\"X\"}");
}