@Test public void assertGracefulHandlingOfMissingDefaultSelector() { final ClassType schoolType = provider.getClassType("School"); SemanticSelector schoolSelector = defaultSelectorRepository.getSelector("School"); assertNotNull("Should not be null", schoolSelector); List<SelectorElement> elements = schoolSelector.get(schoolType); assertEquals("Should match", 1, elements.size()); SelectorElement element = elements.get(0); assertTrue("Should be true", element instanceof IncludeXSDSelectorElement); }
@Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }  }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }  @Override SemanticSelector getSelector(String type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }  @Override SemanticSelector getSelector(String type); static final String DEFAULT_SELECTOR_TYPE_KEY; static final String DEFAULT_SELECTOR_VALUE_KEY; static final String DEFAULT_SELECTOR_RESOURCE_FILENAME; static final Map<String, Object> FALLBACK_SELECTOR; }