Add tests for setRoutes