}
}
@Test
public void shouldFailToModifyReturnedConnections() throws Exception {
CamelRoutingEngine routingEngine = new CamelRoutingEngine();
try {
Connector connector = mock(Connector.class);
ConnectorService cs1 = routingEngine.addConnection("test1", connector);
List<ConnectorService> connectorServices = routingEngine.getConnections();
Assert.assertEquals(connectorServices.size(), 1);
connectorServices.add(cs1);
Assert.assertEquals(connectorServices.size(), 2);
Assert.assertEquals(routingEngine.getConnections().size(), 1);
} finally {
routingEngine.shutdown();
}
}