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

  Connection connection = new MockConnection(eventBus, pipeline);
  eventBus.post(new ConnectionAddedEvent(connection));
  eventBus.post(new ConnectionRemovedEvent(connection));
  assertTrue("The pipeline was not empty", pipeline.getConnections().isEmpty());
}