@Test(expected = IllegalArgumentException.class)
public void invalidUnionInArray() throws SchemaValidationException {

  Schema union = SchemaBuilder.unionOf().intType().and().longType().endUnion();
  Schema array = SchemaBuilder.array().items(union);
  Schema schema = SchemaBuilder.record("r").fields().name("f").type(array).noDefault().endRecord();
  DataHighwaySchemaValidator.validate(schema, DISALLOW_NON_NULLABLE_UNIONS);
}