@Test
public void checkContains() throws JIException {
OCMetadataRoleCollection allRoles = app.getMetadata().getRoles();
OCInfoBaseUsersManager manager = app.getInfoBaseUserManager();
OCInfoBaseUser user = manager.getCurrentUser();
OCUserRoles userRoles = user.getRoles();
System.out.println("---------------------------");
System.out.println("User " + user.getFullName() + " has following roles:");
for (OCRoleMetadataObject role : allRoles) {
System.out.println(role.getName() + ": " + userRoles.contains(role));
}
}