use of org.apache.syncope.common.lib.policy.DefaultPullCorrelationRuleConf in project syncope by apache.
the class PolicyTest method findByKey.
@Test
public void findByKey() {
PullPolicy policy = policyDAO.find("880f8553-069b-4aed-9930-2cd53873f544");
assertNotNull(policy);
CorrelationRule rule = policy.getCorrelationRule(anyTypeDAO.findUser()).orElse(null);
assertNotNull(rule);
DefaultPullCorrelationRuleConf ruleConf = POJOHelper.deserialize(rule.getImplementation().getBody(), DefaultPullCorrelationRuleConf.class);
assertNotNull(ruleConf);
assertEquals(2, ruleConf.getSchemas().size());
assertTrue(ruleConf.getSchemas().contains("username"));
assertTrue(ruleConf.getSchemas().contains("firstname"));
}
Aggregations