AttributeStatementType attributeStatement = (AttributeStatementType) statementAbstractType;
List<ASTChoiceType> attributes = attributeStatement.getAttributes();
assertFalse("Unexpected empty list of attributes", attributes.isEmpty());
assertEquals("Unexpected number of attributes", 1, attributes.size());
Object attributeObject = attributes.iterator().next();
ASTChoiceType astChoice = (ASTChoiceType) attributeObject;
AttributeType attribute = astChoice.getAttribute();
/*
* assertTrue("Unexpected type instead of AttributeStatement: " + attributeObject.getClass().getSimpleName(),
* attributeObject instanceof AttributeType); AttributeType attribute = (AttributeType)attributeObject;
*/
assertEquals("Unexpected name for the role attribute", "roleAttributeName", attribute.getName());