public static UnionDataSchema.Member copyUnionMember(UnionDataSchema.Member member, DataSchema newSkeletonSchema)
  {
    UnionDataSchema.Member newMember = new UnionDataSchema.Member(newSkeletonSchema);
    if (member.hasAlias())
    {
      newMember.setAlias(member.getAlias(), new StringBuilder());
    }
    newMember.setDeclaredInline(member.isDeclaredInline());
    newMember.setDoc(member.getDoc());
    newMember.setProperties(member.getProperties());
    return newMember;
  }
@Test
  public void testCopyUnionMember() throws Exception
  {
    RecordDataSchema fooSchema = (RecordDataSchema) TestUtil.dataSchemaFromString(fooSchemaText);
    UnionDataSchema unionDataSchema = (UnionDataSchema) fooSchema.getField("unionField").getType();
    UnionDataSchema.Member firstMember = unionDataSchema.getMembers().get(0);
    UnionDataSchema.Member newMember = CopySchemaUtil.copyUnionMember(firstMember, firstMember.getType());
    Assert.assertEquals(firstMember, newMember);
  }