private boolean isDeclaredInline(TypeAssignmentContext assignment)
  {
    return assignment.typeReference() == null;
  }
@Test
  public void testUnionDataSchemaWithoutAliases()
  {
    List<String> membersInDeclaredOrder = new ArrayList<>(Arrays.asList("null", "int",
        "com.linkedin.data.schema.grammar.AuxRecord", "com.linkedin.data.schema.grammar.Organization", "array", "map",
        "com.linkedin.data.schema.grammar.MD5", "string"));
    Set<String> inlinedMembers = new HashSet<>(Arrays.asList("com.linkedin.data.schema.grammar.Organization", "array",
        "map", "com.linkedin.data.schema.grammar.MD5", "string"));

    RecordDataSchema mainRecordSchema = (RecordDataSchema) parsePdlSchema("unionWithoutAliases.pdl");
    RecordDataSchema.Field resourceField = mainRecordSchema.getField("resource");

    UnionDataSchema resourceSchema = (UnionDataSchema) resourceField.getType();

    Assert.assertFalse(resourceSchema.areMembersAliased());
    Assert.assertEquals(resourceSchema.getMembers().size(), membersInDeclaredOrder.size());

    int index = 0;
    for (UnionDataSchema.Member member: resourceSchema.getMembers())
    {
      Assert.assertFalse(member.hasError());

      Assert.assertFalse(member.hasAlias());
      Assert.assertNull(member.getAlias());

      String memberKey = member.getUnionMemberKey();
      DataSchema type = member.getType();

      // Verify the member's getUnionMemberKey() is same as the member type's getUnionMemberKey()
      Assert.assertEquals(memberKey, type.getUnionMemberKey());

      // Verify the order is maintained as declared in the union definition
      Assert.assertEquals(memberKey, membersInDeclaredOrder.get(index));

      // Verify the type, doc and other properties are empty
      Assert.assertEquals(type, resourceSchema.getTypeByMemberKey(memberKey));
      Assert.assertTrue(member.getDoc().isEmpty());
      Assert.assertTrue(member.getProperties().isEmpty());

      // Verify the inlined member definition is captured correctly
      Assert.assertEquals(member.isDeclaredInline(), inlinedMembers.contains(memberKey));

      index++;
    }
  }