@@ -0,0 +1,1313 @@
+package edu.northwestern.bioinformatics.studycalendar.web.schedule;%0A%0Aimport edu.northwestern.bioinformatics.studycalendar.service.StudyService;%0Aimport edu.northwestern.bioinformatics.studycalendar.testing.StudyCalendarTestCase;%0Aimport gov.nih.nci.cabig.ctms.lang.DateTools;%0Aimport gov.nih.nci.cabig.ctms.lang.NowFactory;%0Aimport static org.easymock.EasyMock.expect;%0A%0Aimport java.util.Calendar;%0A%0Apublic class ScheduleReconsentCommandTest extends StudyCalendarTestCase %7B%0A    private ScheduleReconsentCommand command;%0A    private StudyService studyService;%0A    private NowFactory nowFactory;%0A%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A        studyService = registerMockFor(StudyService.class);%0A        nowFactory = registerMockFor(NowFactory.class);%0A        command = new ScheduleReconsentCommand(studyService, nowFactory);%0A    %7D%0A%0A    public void testValidate() throws Exception %7B%0A        command.setStartDate(DateTools.createTimestamp(2005, Calendar.AUGUST, 3));%0A%0A        expect(nowFactory.getNow()).andReturn(DateTools.createDate(2007, Calendar.AUGUST, 3)).times(2);%0A        replayMocks();%0A        command.validate(null);%0A        verifyMocks();%0A        assertSameDay(%22Expected Date different than actual%22, DateTools.createDate(2007, Calendar.AUGUST, 3), command.getStartDate());%0A    %7D%0A%7D%0A

Test for the Schedule Reconsent Command