request.setContextPath("/firefly");
request.setMethod("GET");
MockHttpServletResponse response = new MockHttpServletResponse();
dispatcherController.dispatch(request, response);
Food food = (Food)request.getAttribute("fruit0");
Assert.assertThat(food.getName(), is("apple"));
Assert.assertThat(food.getPrice(), is(8.0));
food = (Food)request.getAttribute("fruit1");
Assert.assertThat(food.getName(), is("ananas"));
Assert.assertThat(food.getPrice(), is(4.99));
food = Json.toObject(response.getAsString(), Food.class);
Assert.assertThat(food.getName(), is("banana"));
Assert.assertThat(food.getPrice(), is(3.99));
}