@Test public void testGetDefinitionsByLabel() { assertEquals(Collections.emptySet(), tested.getDefinitions("SOMETHING_NOT_EXISTING")); Set<String> defs1 = tested.getDefinitions(ROLE1); assertEquals(1, defs1.size()); assertEquals(DEF_ID1, defs1.iterator().next()); Set<String> defs2 = tested.getDefinitions(ROLE2); assertEquals(1, defs2.size()); assertEquals(DEF_ID2, defs2.iterator().next()); }
public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); return null != ids ? ids : Collections.emptySet(); }
DomainLookupsCache { public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); return null != ids ? ids : Collections.emptySet(); } }
DomainLookupsCache { public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); return null != ids ? ids : Collections.emptySet(); } DomainLookupsCache(final DefinitionManager definitionManager,
                       final DefinitionsCacheRegistry definitionsRegistry,
                       final String defSetId); }
DomainLookupsCache { public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); return null != ids ? ids : Collections.emptySet(); } DomainLookupsCache(final DefinitionManager definitionManager,
                       final DefinitionsCacheRegistry definitionsRegistry,
                       final String defSetId); Set<String> getDefinitions(final String label); void clear(); String getDefinitionSetId(); List<CanConnect> getConnectionRules(); RuleSet getRuleSet(); }
DomainLookupsCache { public Set<String> getDefinitions(final String label) { final Set<String> ids = definitionsByLabel.get(label); return null != ids ? ids : Collections.emptySet(); } DomainLookupsCache(final DefinitionManager definitionManager,
                       final DefinitionsCacheRegistry definitionsRegistry,
                       final String defSetId); Set<String> getDefinitions(final String label); void clear(); String getDefinitionSetId(); List<CanConnect> getConnectionRules(); RuleSet getRuleSet();  }