@Test public void testIsSourceConnectionAllowed() { assertTrue(isSourceConnectionAllowed(permittedConnections, new HashSet<String>(1) {{ add(ROLE1); }})); assertTrue(isSourceConnectionAllowed(permittedConnections, new HashSet<String>(1) {{ add(ROLE2); }})); assertFalse(isSourceConnectionAllowed(permittedConnections, new HashSet<String>(1) {{ add(ROLE3); }})); }
public static boolean isSourceConnectionAllowed(final CanConnect rule, final Set<String> labels) { return rule.getPermittedConnections().stream() .anyMatch(pc -> labels.contains(pc.getStartRole())); }
DomainLookupFunctions { public static boolean isSourceConnectionAllowed(final CanConnect rule, final Set<String> labels) { return rule.getPermittedConnections().stream() .anyMatch(pc -> labels.contains(pc.getStartRole())); } }
DomainLookupFunctions { public static boolean isSourceConnectionAllowed(final CanConnect rule, final Set<String> labels) { return rule.getPermittedConnections().stream() .anyMatch(pc -> labels.contains(pc.getStartRole())); }  }
DomainLookupFunctions { public static boolean isSourceConnectionAllowed(final CanConnect rule, final Set<String> labels) { return rule.getPermittedConnections().stream() .anyMatch(pc -> labels.contains(pc.getStartRole())); }  static boolean isSourceConnectionAllowed(final CanConnect rule,
                                                    final Set<String> labels); }
DomainLookupFunctions { public static boolean isSourceConnectionAllowed(final CanConnect rule, final Set<String> labels) { return rule.getPermittedConnections().stream() .anyMatch(pc -> labels.contains(pc.getStartRole())); }  static boolean isSourceConnectionAllowed(final CanConnect rule,
                                                    final Set<String> labels);  }