### Question:
VariableNeighborhoodDescent extends LocalSearch { @Override public CVRPSolution findLocalOptimum(CVRPSolution baseSolution) { if (baseSolution == null || !baseSolution.isFeasible()) { throw new IllegalAccessError("invalid initial solution, it is null or unfeasible"); } int currentMove = 0; Move[] movesToUse = getMovesToUse(); BestNeighborLocalSearch bestNeighborFinder; CVRPSolution bestSolutionFoundSoFar = baseSolution; while (currentMove < movesToUse.length) { bestNeighborFinder = new BestNeighborLocalSearch(movesToUse[currentMove]); CVRPSolution localOptimumSolution = bestNeighborFinder.findLocalOptimum(baseSolution); if (DoubleCompare.lessThan(localOptimumSolution.getTotalDistance(), bestSolutionFoundSoFar.getTotalDistance())) { bestSolutionFoundSoFar = localOptimumSolution; currentMove = 0; } else { currentMove += 1; } } return bestSolutionFoundSoFar; } VariableNeighborhoodDescent(Move[] movesToUse); @Override CVRPSolution findLocalOptimum(CVRPSolution baseSolution); Move[] getMovesToUse();  }### Answer:
@Test public void shouldReturnSameSolutionAsOptimumForSingleRouteEmptyBaseSolution() { CVRPSolution solution = new CVRPSolution(this.problemInfo, new ArrayList<>(Arrays.asList(new Integer[] { CVRPSolution.SEPARATOR }))); CVRPSolution localOptimum = this.uut.findLocalOptimum(solution); assertEquals(solution, localOptimum); }
@Test public void shouldReturnSameSolutionAsOptimumForSingleRouteSingleClientBaseSolution() { CVRPSolution solution = new CVRPSolution(this.problemInfo, new ArrayList<>(Arrays.asList(new Integer[] { 3, CVRPSolution.SEPARATOR }))); CVRPSolution localOptimum = this.uut.findLocalOptimum(solution); assertEquals(solution, localOptimum); }
@Test public void shouldReturnSameSolutionAsOptimumForMultipleRoutesSingleClientBaseSolution() { CVRPSolution solution = new CVRPSolution(this.problemInfo, new ArrayList<>(Arrays.asList( new Integer[] { 1, CVRPSolution.SEPARATOR, 2, CVRPSolution.SEPARATOR, 3, CVRPSolution.SEPARATOR }))); CVRPSolution localOptimum = this.uut.findLocalOptimum(solution); assertEquals(solution, localOptimum); }