Matchers.is("Fedora"))));
}
@Test
public void notAssignedFedoraRule() {
UserAccountService userAccountService =
seam.autowire(UserAccountServiceImpl.class);
// Non Fedora account
HAccount account = em.find(HAccount.class, 3L);
assertThat(new ArrayList<HAccountRole>(account.getRoles()),
not(Matchers.<HAccountRole> hasItem(hasProperty("name",
Matchers.is("Fedora")))));
account =
userAccountService.runRoleAssignmentRules(account, null,
"fedora");
// It's still not Fedora
assertThat(new ArrayList<HAccountRole>(account.getRoles()),
not(Matchers.<HAccountRole> hasItem(hasProperty("name",
Matchers.is("Fedora")))));