Problem problem = new Problem("start",
MapFunctionFactory.getActionsFunction(map),
MapFunctionFactory.getResultFunction(), new DefaultGoalTest(
"goal"), new MapStepCostFunction(map));
Search search = new UniformCostSearch();
SearchAgent agent = new SearchAgent(problem, search);
List<Action> actions = agent.getActions();
Assert.assertEquals(
"[Action[name==moveTo, location==b], Action[name==moveTo, location==d], Action[name==moveTo, location==goal]]",
actions.toString());
Assert.assertEquals("5.5",
search.getMetrics().get(QueueSearch.METRIC_PATH_COST));
}