### Question:
RouteOptimizerImpl implements RouteOptimizer { @Override public void removeAllLocations() { solverManager.stopSolver(); depot = null; visits.clear(); publishSolution(); } @Autowired  RouteOptimizerImpl(SolverManager solverManager, RouteChangedEventPublisher routeChangedEventPublisher); @Override void addLocation(Location domainLocation, DistanceMatrixRow distanceMatrixRow); @Override void removeLocation(Location domainLocation); @Override void addVehicle(Vehicle domainVehicle); @Override void removeVehicle(Vehicle domainVehicle); @Override void changeCapacity(Vehicle domainVehicle); @Override void removeAllLocations(); @Override void removeAllVehicles();  }### Answer:
@Test void removing_all_locations_should_not_fail_when_solver_is_not_solving() { assertThatCode(() -> routeOptimizer.removeAllLocations()).doesNotThrowAnyException(); }