/**
* test that cheese action works and store cheese in service
*/
public void testCheeseAction() throws Exception {
DefaultCheeseService service = new DefaultCheeseService(new MemoryCheeseDao());
CheeseAction action = new CheeseAction(service);
action.getCheese().setName("gouda");
action.getCheese().setCountry("Netherlands");
action.setCommand("save");
assertEquals(CheeseAction.SUCCESS,action.execute());
// Cheddar exists already -- count 1
assertEquals(2, service.getCheeses().size());
action.setCommand("remove");
assertEquals(CheeseAction.SUCCESS,action.execute());
assertEquals(1, service.getCheeses().size());
}