### Question:
RerouteUtil { public boolean routesEquals(List<DriveOrder> ordersA, List<DriveOrder> ordersB) { List<Route> routesA = ordersA.stream() .map(order -> order.getRoute()) .collect(Collectors.toList()); List<Route> routesB = ordersB.stream() .map(order -> order.getRoute()) .collect(Collectors.toList()); return Objects.equals(routesA, routesB); } @Inject  RerouteUtil(Router router,
                     VehicleControllerPool vehicleControllerPool,
                     InternalTransportOrderService transportOrderService,
                     DefaultDispatcherConfiguration configuration); void reroute(Vehicle vehicle); List<DriveOrder> getUnfinishedDriveOrders(TransportOrder order); DriveOrder mergeDriveOrders(DriveOrder orderA, DriveOrder orderB, Vehicle vehicle); Optional<List<DriveOrder>> tryReroute(List<DriveOrder> driveOrders,
                                               Vehicle vehicle,
                                               Point sourcePoint); List<Step> getFutureSteps(Vehicle vehicle); Point getFutureOrCurrentPosition(Vehicle vehicle); boolean routesEquals(List<DriveOrder> ordersA, List<DriveOrder> ordersB);  }### Answer:
@Test public void shouldReturnFalseForStepsNotEqual() { DriveOrder orderA = createDriveOrder(10, "A", "B", "C"); DriveOrder orderB = createDriveOrder(10, "A", "B"); assertFalse(rerouteUtil.routesEquals(Arrays.asList(orderA), Arrays.asList(orderB))); }
@Test public void shouldReturnFalseForCostsNotEqual() { DriveOrder orderA = createDriveOrder(10, "A", "B", "C"); DriveOrder orderB = createDriveOrder(20, "A", "B", "C"); assertFalse(rerouteUtil.routesEquals(Arrays.asList(orderA), Arrays.asList(orderB))); }
@Test public void shouldReturnTrueForRoutesEqual() { DriveOrder orderA = createDriveOrder(10, "A", "B", "C"); DriveOrder orderB = createDriveOrder(10, "A", "B", "C"); assertTrue(rerouteUtil.routesEquals(Arrays.asList(orderA), Arrays.asList(orderB))); }