public void testFormBackingObject() throws Exception { EasyMock.expect(notificationDao.getAll()).andReturn(nfList); replayMocks(); ListSafetyNotificationCommand cmd = (ListSafetyNotificationCommand) controller.formBackingObject(request); assertSame(nfList, cmd.getNotifications()); verifyMocks(); }
public void setUp() throws Exception { super.setUp(); controller = new ListSafetyNotificationController(); notificationDao = registerDaoMockFor(NotificationDao.class); controller.setNotificationDao(notificationDao); }