public ClassTemplateSpec generate(DataSchema schema, DataSchemaLocation location)
  {
    pushCurrentLocation(location);
    final ClassTemplateSpec result = processSchema(schema, null, null);
    popCurrentLocation();
    return result;
  }
@Test(dataProvider = "customTypeDataForUnion")
  public void testCustomInfoForUnionMembers(final List<DataSchema> customTypedSchemas)
  {
    final UnionDataSchema union = new UnionDataSchema();
    List<UnionDataSchema.Member> members = customTypedSchemas.stream()
        .map(UnionDataSchema.Member::new)
        .collect(Collectors.toCollection(ArrayList::new));
    union.setMembers(members, null);
    final TyperefDataSchema typeref = new TyperefDataSchema(new Name(INPUT_SCHEMA_NAME));
    typeref.setReferencedType(union);

    final TemplateSpecGenerator generator = new TemplateSpecGenerator(_resolver);
    final UnionTemplateSpec spec = (UnionTemplateSpec) generator.generate(typeref, _location);

    for (int i = 0; i < customTypedSchemas.size(); ++i)
    {
      Assert.assertNotNull(spec.getMembers().get(i).getCustomInfo());
      Assert.assertEquals(spec.getMembers().get(i).getCustomInfo().getCustomClass().getClassName(),
                          CustomTypeUtil.getJavaCustomTypeClassNameFromSchema((TyperefDataSchema) customTypedSchemas.get(i)));
    }
  }