SolverValidator { public static Solver wrap(Solver delegate) { return new SolverValidator.ValidatedSolver(delegate); } private  SolverValidator(); static Solver wrap(Solver delegate); static StochasticSupplier<Solver> wrap(
      StochasticSupplier<? extends Solver> sup); static GlobalStateObject validateInputs(GlobalStateObject state); static void checkRoute(VehicleStateObject vs, int i); static ImmutableList<ImmutableList<Parcel>> validateOutputs(
      ImmutableList<ImmutableList<Parcel>> routes, GlobalStateObject state);  }
@Test public void testWrap() throws InterruptedException { TestUtil.testPrivateConstructor(SolverValidator.class); final ImmutableSet<Parcel> empty = ImmutableSet.of(); final VehicleStateObject vs1 = VehicleStateObject.create(vdto(), new Point(0, 0), absent, empty, 0, null, null); final VehicleStateObject vs2 = VehicleStateObject.create(vdto(), new Point(0, 0), absent, ImmutableSet.of(p3), 0, null, null); final VehicleStateObject vs3 = VehicleStateObject.create(vdto(), new Point(0, 0), absent, empty, 0, p4, null); final ImmutableList<ImmutableList<Parcel>> routes = ImmutableList.of( ImmutableList.of(p1, p1), ImmutableList.of(p2, p3, p2), ImmutableList.of(p4, p5, p5, p4)); final ImmutableSet<Parcel> availableParcels = ImmutableSet.of(p1, p2, p4, p5); final ImmutableList<VehicleStateObject> vehicles = ImmutableList.of(vs1, vs2, vs3); @SuppressWarnings("null") final GlobalStateObject state = GlobalStateObject.create(availableParcels, vehicles, 0, SI.SECOND, SI.METERS_PER_SECOND, SI.CENTIMETER, mock(RoadModelSnapshot.class)); final Solver solver = SolverValidator.wrap(new FakeSolver(routes)); solver.solve(state); }