### Question:
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);  }### Answer:
@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); }})); }