/** * Test if the model contains the list of all products. The following conditions are checked :<br> * * <ul> * <li>The model contains an attribute called "list" * <li>This list contains only one object * <li>This object is equal to the {@link Client} created before in setUp() method * </ul> */ @Test public void testList() { controller.list(m); Map<String, Object> map = m.asMap(); assertTrue(m.containsAttribute("list")); List<?> clients = (List<?>) map.get("list"); assertEquals(1, clients.size()); assertEquals(client, clients.get(0)); }