TurtleSpy { protected double evaluateDistance(String[] commands) { Location location = new Location(ORIGIN); for (String command: commands) { location.applyCommand(command); } return location.distance(ORIGIN); }  double maxDistance(String[] commands);  }
@Test public void testEvaluateDistance1() { String[] commands = (String[]) Arrays.asList("forward 100", "left 90", "backward 100").toArray(); Double distance = tester.evaluateDistance(commands); assertEquals(141.4213562373095, distance, PRECISION); }