### Question:
DefaultVehicleController implements VehicleController,
               PropertyChangeListener,
               EventHandler { @Override public void setDriveOrder(@Nonnull DriveOrder newOrder, @Nonnull Map<String, String> orderProperties) throws IllegalStateException { synchronized (commAdapter) { requireNonNull(newOrder, "newOrder"); requireNonNull(orderProperties, "orderProperties"); requireNonNull(newOrder.getRoute(), "newOrder.getRoute()"); checkState(currentDriveOrder == null, "%s still has an order! Current order: %s, new order: %s", vehicle.getName(), currentDriveOrder, newOrder); scheduler.claim(this, asResourceSequence(newOrder.getRoute().getSteps())); currentDriveOrder = newOrder; lastCommandExecuted = null; vehicleService.updateVehicleRouteProgressIndex(vehicle.getReference(), Vehicle.ROUTE_INDEX_DEFAULT); createFutureCommands(newOrder, orderProperties); if (canSendNextCommand()) { allocateForNextCommand(); } Point nextPoint = newOrder.getRoute().getSteps().get(0).getDestinationPoint(); vehicleService.updateVehicleNextPosition(vehicle.getReference(), nextPoint.getReference()); } } @Inject  DefaultVehicleController(@Assisted @Nonnull Vehicle vehicle,
                                  @Assisted @Nonnull VehicleCommAdapter adapter,
                                  @Nonnull LocalKernel kernel,
                                  @Nonnull InternalVehicleService vehicleService,
                                  @Nonnull NotificationService notificationService,
                                  @Nonnull DispatcherService dispatcherService,
                                  @Nonnull Scheduler scheduler,
                                  @Nonnull @ApplicationEventBus EventBus eventBus); @Override boolean isInitialized(); @Override @SuppressWarnings("deprecation") void initialize(); @Override @SuppressWarnings("deprecation") void terminate(); @Override void propertyChange(PropertyChangeEvent evt); @Override void onEvent(Object event); @Override void setDriveOrder(@Nonnull DriveOrder newOrder,
                            @Nonnull Map<String, String> orderProperties); @Override void updateDriveOrder(@Nonnull DriveOrder newOrder,
                               @Nonnull Map<String, String> orderProperties); @Override void clearDriveOrder(); @Override void abortDriveOrder(); @Override void clearCommandQueue(); @Override @Deprecated void resetVehiclePosition(); @Override @Nonnull ExplainedBoolean canProcess(@Nonnull List<String> operations); @Override void sendCommAdapterMessage(@Nullable Object message); @Override void sendCommAdapterCommand(AdapterCommand command); @Override Queue<MovementCommand> getCommandsSent(); @Override @Nonnull String getId(); @Override boolean allocationSuccessful(@Nonnull Set<TCSResource<?>> resources); @Override void allocationFailed(@Nonnull Set<TCSResource<?>> resources); @Override String toString();  }### Answer:
@Test(expected = IllegalStateException.class) public void shouldNotAcceptMultipleDriveOrders() { Location location = dataObjectFactory.createLocation(); Point dstPoint = dataObjectFactory.createPoint(); Path stepPath = dataObjectFactory.createPath(dstPoint.getReference()); List<Route.Step> steps = Collections.singletonList( new Route.Step(stepPath, null, dstPoint, Vehicle.Orientation.FORWARD, 0)); DriveOrder driveOrder = new DriveOrder(new DriveOrder.Destination(location.getReference())) .withRoute(new Route(steps, 1)); stdVehicleController.setDriveOrder(driveOrder, new HashMap<>()); stdVehicleController.setDriveOrder(driveOrder, new HashMap<>()); }