@Test
public void testHasRole() throws InterruptedException {
setUpForReadConfigurationTest();
executeTest(new Runnable() {
public void run() {
PrincipalCollection principalCollection = new SimplePrincipalCollection("user1", "realm1");
assertTrue("principal doesn't have role when it should",
realm.hasRole(principalCollection, "role2"));
assertTrue("principal doesn't have all roles when it should",
realm.hasAllRoles(principalCollection, Arrays.asList(new String[]{"role1", "role2"})));
}