@Test
@SuppressWarnings("unchecked")
public void testPipelineRemoved() {

  Step step1 = stepFactory.create(new OperationMetaData(AdditionOperation.DESCRIPTION, () ->
      new AdditionOperation(isf, osf)));
  Step step2 = stepFactory.create(new OperationMetaData(AdditionOperation.DESCRIPTION, () ->
      new AdditionOperation(isf, osf)));
  final InputSocket<Double> a1 = step1.getInputSockets().get(0);
  final InputSocket<Double> b1 = step1.getInputSockets().get(1);
  final OutputSocket<Double> sum1 = step1.getOutputSockets().get(0);
  final InputSocket<Double> a2 = step2.getInputSockets().get(0);
  final InputSocket<Double> b2 = step2.getInputSockets().get(1);
  final OutputSocket<Double> sum2 = step2.getOutputSockets().get(0);
  a2.setValue(0.0);
  pipeline.addStep(step1);
  pipeline.addStep(step2);
  Connection connection = new Connection(eventBus, pipeline, sum1, a2);
  eventBus.post(new ConnectionAddedEvent(connection));
  eventBus.post(new ConnectionRemovedEvent(connection));
  ManualPipelineRunner runner = new ManualPipelineRunner(eventBus, pipeline);
  // Since the connection between sum1 and a2 was removed, a2 should still be equal to 0.0 here.
  a1.setValue(123.0);
  b1.setValue(456.0);
  b2.setValue(789.0);
  runner.runPipeline();
  assertEquals((Double) 789.0, sum2.getValue().get());
}