### Question:
HeuristicClosestSquared implements Heuristic { @Override public double getCost(int sx, int sy, int dx, int dy) { final double x = dx - (double) sx; final double y = dy - (double) sy; return x * x + y * y; } HeuristicClosestSquared(); @Override double getCost(int sx, int sy, int dx, int dy);  }### Answer:
@Test void testHeuristic() { final Heuristic heuristic = new HeuristicClosestSquared(); assertEquals(8.0, heuristic.getCost(1, 2, 3, 4)); }