@Test public void testSimulation() { String elementRef = "some_element_ref"; EList<Scenario> scenarios = ECollections.newBasicEList(); Scenario scenario = mock(Scenario.class); scenarios.add(scenario); EList<ElementParameters> parameters = ECollections.newBasicEList(); ElementParameters parameter = mock(ElementParameters.class); when(parameter.getElementRef()).thenReturn(elementRef); parameters.add(parameter); when(scenario.getElementParameters()).thenReturn(parameters); BPSimDataType simDataType = mock(BPSimDataType.class); simData.add(simDataType); when(simDataType.getScenario()).thenReturn(scenarios); setUp(); assertEquals(parameter, definitionResolver.resolveSimulationParameters(elementRef).get()); }
public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); }
DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } }
DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } DefinitionResolver(
            Definitions definitions,
            Collection<WorkItemDefinition> workItemDefinitions,
            boolean jbpm,
            Mode mode);  DefinitionResolver(Definitions definitions,
                              Collection<WorkItemDefinition> workItemDefinitions); }
DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } DefinitionResolver(
            Definitions definitions,
            Collection<WorkItemDefinition> workItemDefinitions,
            boolean jbpm,
            Mode mode);  DefinitionResolver(Definitions definitions,
                              Collection<WorkItemDefinition> workItemDefinitions); BPMNDiagram getDiagram(); double getResolutionFactor(); boolean isJbpm(); Definitions getDefinitions(); Process getProcess(); Mode getMode(); Collection<WorkItemDefinition> getWorkItemDefinitions(); Optional<Signal> resolveSignal(String id); String resolveSignalName(String id); Optional<ElementParameters> resolveSimulationParameters(String id); BPMNShape getShape(String elementId); BPMNEdge getEdge(String elementId); }
DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } DefinitionResolver(
            Definitions definitions,
            Collection<WorkItemDefinition> workItemDefinitions,
            boolean jbpm,
            Mode mode);  DefinitionResolver(Definitions definitions,
                              Collection<WorkItemDefinition> workItemDefinitions); BPMNDiagram getDiagram(); double getResolutionFactor(); boolean isJbpm(); Definitions getDefinitions(); Process getProcess(); Mode getMode(); Collection<WorkItemDefinition> getWorkItemDefinitions(); Optional<Signal> resolveSignal(String id); String resolveSignalName(String id); Optional<ElementParameters> resolveSimulationParameters(String id); BPMNShape getShape(String elementId); BPMNEdge getEdge(String elementId);  }