@Test
public void testRoleFilter() {

	List<RoleResponse> roles = new ArrayList<>();
	roles.add(new RoleResponse().setName("role1").setGroups(new GroupReference().setName("group1")));
	roles.add(new RoleResponse().setName("role2"));
	roles.add(new RoleResponse().setName("role3"));
	List<GroupResponse> groups = new ArrayList<>();
	groups.add(new GroupResponse().setName("group2").setRoles(new RoleReference().setName("role2")));
	groups.add(new GroupResponse().setName("group3"));
	RoleFilter filter = AuthServicePluginUtils.createRoleFilter(roles, groups);
	assertTrue(filter.filter("admin", "role"));
	assertTrue(filter.filter("group3", "role3"));
	assertFalse(filter.filter("group2", "role2"));
	assertFalse(filter.filter("group1", "role1"));
}