public static void assertEquals(String message,Attributes expected,Attributes actual,boolean compareDefaultValues){
  Assert.assertEquals(message + " (number of attributes)",expected.allSize(),actual.allSize());
  Assert.assertEquals(message + " (number of special attributes)",expected.specialSize(),actual.specialSize());
  Iterator<AttributeRole> expectedRoleIt=expected.regularAttributes();
  Iterator<AttributeRole> actualRoleIt=actual.regularAttributes();
  while (expectedRoleIt.hasNext()) {
    AttributeRole expectedRole=expectedRoleIt.next();
    AttributeRole actualRole=actualRoleIt.next();
    RapidAssert.assertEquals(message,expectedRole,actualRole,compareDefaultValues);
  }
  expectedRoleIt=expected.specialAttributes();
  while (expectedRoleIt.hasNext()) {
    AttributeRole expectedRole=expectedRoleIt.next();
    AttributeRole actualRole=actual.getRole(actual.getSpecial(expectedRole.getSpecialName()));
    RapidAssert.assertEquals(message,expectedRole,actualRole,compareDefaultValues);
  }
}

public static void assertEquals ( String message , Attributes expected , Attributes actual , boolean compareDefaultValues ) { Assert . assertEquals ( message + " (number of attributes)" , expected . allSize ( ) , actual . allSize ( ) ) ; Assert . assertEquals ( message + " (number of special attributes)" , expected . specialSize ( ) , actual . specialSize ( ) ) ; Iterator < AttributeRole > expectedRoleIt = expected . regularAttributes ( ) ; Iterator < AttributeRole > actualRoleIt = actual . regularAttributes ( ) ; while ( expectedRoleIt . hasNext ( ) ) { AttributeRole expectedRole = expectedRoleIt . next ( ) ; AttributeRole actualRole = actualRoleIt . next ( ) ; RapidAssert . assertEquals ( message , expectedRole , actualRole , compareDefaultValues ) ; } expectedRoleIt = expected . specialAttributes ( ) ; while ( expectedRoleIt . hasNext ( ) ) { AttributeRole expectedRole = expectedRoleIt . next ( ) ; AttributeRole actualRole = actual . getRole ( actual . getSpecial ( expectedRole . getSpecialName ( ) ) ) ; RapidAssert . assertEquals ( message , expectedRole , actualRole , compareDefaultValues ) ; } }
tests if all attributes are equal . this method is sensitive to the regular attribute ordering . optionally compares the default values of the attributes . the default value is only relevant for sparse data rows , so it should not be compared for non - sparse data .
