@Test public void testGetPrefixForNamespaceURIWhenDefinitionsIsNull() { final String namespaceURI = FEEL.getUri(); when(dmnGraphUtils.getModelDefinitions()).thenReturn(null); final Optional<String> prefix = utils.getPrefixForNamespaceURI(namespaceURI); assertFalse(prefix.isPresent()); }
Optional<String> getPrefixForNamespaceURI(final String namespace) { final Definitions definitions = dmnGraphUtils.getModelDefinitions(); return definitions == null ? Optional.empty() : definitions.getPrefixForNamespaceURI(namespace); }
ItemDefinitionUtils { Optional<String> getPrefixForNamespaceURI(final String namespace) { final Definitions definitions = dmnGraphUtils.getModelDefinitions(); return definitions == null ? Optional.empty() : definitions.getPrefixForNamespaceURI(namespace); } }
ItemDefinitionUtils { Optional<String> getPrefixForNamespaceURI(final String namespace) { final Definitions definitions = dmnGraphUtils.getModelDefinitions(); return definitions == null ? Optional.empty() : definitions.getPrefixForNamespaceURI(namespace); } @Inject  ItemDefinitionUtils(final DMNGraphUtils dmnGraphUtils); }
ItemDefinitionUtils { Optional<String> getPrefixForNamespaceURI(final String namespace) { final Definitions definitions = dmnGraphUtils.getModelDefinitions(); return definitions == null ? Optional.empty() : definitions.getPrefixForNamespaceURI(namespace); } @Inject  ItemDefinitionUtils(final DMNGraphUtils dmnGraphUtils); Optional<ItemDefinition> findByName(final String name); List<ItemDefinition> all(); void addItemDefinitions(final List<ItemDefinition> newItemDefinitions); String getConstraintText(final ItemDefinition itemDefinition); QName normaliseTypeRef(final QName typeRef); }
ItemDefinitionUtils { Optional<String> getPrefixForNamespaceURI(final String namespace) { final Definitions definitions = dmnGraphUtils.getModelDefinitions(); return definitions == null ? Optional.empty() : definitions.getPrefixForNamespaceURI(namespace); } @Inject  ItemDefinitionUtils(final DMNGraphUtils dmnGraphUtils); Optional<ItemDefinition> findByName(final String name); List<ItemDefinition> all(); void addItemDefinitions(final List<ItemDefinition> newItemDefinitions); String getConstraintText(final ItemDefinition itemDefinition); QName normaliseTypeRef(final QName typeRef);  }