@Test
void vehicle_without_a_depot_is_illegal_if_depot_exists() {

    PlanningDepot depot = new PlanningDepot(testLocation(1));
    PlanningVehicle vehicle = testVehicle(1);
    VehicleRoutingSolution solution = solutionFromVisits(singletonList(vehicle), depot, emptyList());
    vehicle.setDepot(null);
    assertThatIllegalArgumentException()
            .isThrownBy(() -> RouteChangedEventPublisher.solutionToEvent(solution, this))
            .withMessageContaining("Vehicle");
}