@Test(expected = UnsupportedOperationException.class) public void testIndexDefinitionsUnmodifiable() { final JSITItemDefinition definition1 = mock(JSITItemDefinition.class); final String name1 = "name1"; final List<JSITItemDefinition> list = Arrays.asList(definition1); when(definition1.getName()).thenReturn(name1); final Map<String, JSITItemDefinition> index = abstractKogitoDMNServiceSpy.indexDefinitionsByName(list); index.put("name2", mock(JSITItemDefinition.class)); }
Map<String, JSITItemDefinition> indexDefinitionsByName(final List<JSITItemDefinition> allDefinitions) { final HashMap<String, JSITItemDefinition> index = new HashMap<>(); for (int i = 0; i < allDefinitions.size(); i++) { final JSITItemDefinition value = Js.uncheckedCast(allDefinitions.get(i)); index.put(value.getName(), value); } return Collections.unmodifiableMap(index); }
AbstractKogitoDMNService implements KogitoDMNService { Map<String, JSITItemDefinition> indexDefinitionsByName(final List<JSITItemDefinition> allDefinitions) { final HashMap<String, JSITItemDefinition> index = new HashMap<>(); for (int i = 0; i < allDefinitions.size(); i++) { final JSITItemDefinition value = Js.uncheckedCast(allDefinitions.get(i)); index.put(value.getName(), value); } return Collections.unmodifiableMap(index); } }
AbstractKogitoDMNService implements KogitoDMNService { Map<String, JSITItemDefinition> indexDefinitionsByName(final List<JSITItemDefinition> allDefinitions) { final HashMap<String, JSITItemDefinition> index = new HashMap<>(); for (int i = 0; i < allDefinitions.size(); i++) { final JSITItemDefinition value = Js.uncheckedCast(allDefinitions.get(i)); index.put(value.getName(), value); } return Collections.unmodifiableMap(index); }  }
AbstractKogitoDMNService implements KogitoDMNService { Map<String, JSITItemDefinition> indexDefinitionsByName(final List<JSITItemDefinition> allDefinitions) { final HashMap<String, JSITItemDefinition> index = new HashMap<>(); for (int i = 0; i < allDefinitions.size(); i++) { final JSITItemDefinition value = Js.uncheckedCast(allDefinitions.get(i)); index.put(value.getName(), value); } return Collections.unmodifiableMap(index); }  @Override FactModelTuple getFactModelTuple(final JSITDefinitions jsitDefinitions); boolean isJSITInputData(JSITDRGElement jsitdrgElement); boolean isJSITDecision(JSITDRGElement jsitdrgElement); Map<QName, String> getOtherAttributesMap(JSITDMNElement jsitInputDataVariable); }
AbstractKogitoDMNService implements KogitoDMNService { Map<String, JSITItemDefinition> indexDefinitionsByName(final List<JSITItemDefinition> allDefinitions) { final HashMap<String, JSITItemDefinition> index = new HashMap<>(); for (int i = 0; i < allDefinitions.size(); i++) { final JSITItemDefinition value = Js.uncheckedCast(allDefinitions.get(i)); index.put(value.getName(), value); } return Collections.unmodifiableMap(index); }  @Override FactModelTuple getFactModelTuple(final JSITDefinitions jsitDefinitions); boolean isJSITInputData(JSITDRGElement jsitdrgElement); boolean isJSITDecision(JSITDRGElement jsitdrgElement); Map<QName, String> getOtherAttributesMap(JSITDMNElement jsitInputDataVariable); static final String URI_FEEL; static final String WRONG_DMN_MESSAGE; }