@Test
public void commonExecution() {

    when(scenarioCommandManagerMock.execute(eq(scenarioSimulationContextLocal), eq(appendRowCommandMock))).thenReturn(CommandResultBuilder.SUCCESS);
    scenarioSimulationEventHandler.commonExecution(appendRowCommandMock, true);
    assertEquals(simulationMock, scenarioSimulationContextLocal.getStatus().getSimulation());
    verify(scenarioCommandRegistryManagerMock, times(1)).register(eq(scenarioSimulationContextLocal), eq(appendRowCommandMock));
    //
    reset(scenarioCommandRegistryManagerMock);
    CommandResult<ScenarioSimulationViolation> status = new CommandResultImpl<>(CommandResult.Type.ERROR, Collections.singletonList(new ScenarioSimulationViolation("FAKE ERROR")));
    when(scenarioCommandManagerMock.execute(eq(scenarioSimulationContextLocal), eq(appendRowCommandMock))).thenReturn(status);
    scenarioSimulationEventHandler.commonExecution(appendRowCommandMock, true);
    assertEquals(simulationMock, scenarioSimulationContextLocal.getStatus().getSimulation());
    verify(scenarioCommandRegistryManagerMock, never()).register(eq(scenarioSimulationContextLocal), eq(appendRowCommandMock));
}