diff --git a/app/src/test/java/org/dhis2/usescases/programEventDetail/usecase/CreateEventUseCaseTest.kt b/app/src/test/java/org/dhis2/usescases/programEventDetail/usecase/CreateEventUseCaseTest.kt index 59885e35767..7bc399acdb9 100644 --- a/app/src/test/java/org/dhis2/usescases/programEventDetail/usecase/CreateEventUseCaseTest.kt +++ b/app/src/test/java/org/dhis2/usescases/programEventDetail/usecase/CreateEventUseCaseTest.kt @@ -380,7 +380,7 @@ class CreateEventUseCaseTest { whenever(d2.programModule().programStages().uid(PROGRAM_STAGE_ID).blockingGet()?.standardInterval()) doReturn 15 whenever(d2.programModule().programStages().uid(PROGRAM_STAGE_ID).blockingGet()?.periodType()) doReturn PeriodType.Monthly whenever(d2.programModule().programStages().uid(PROGRAM_STAGE_ID).blockingGet()?.periodType()) doReturn PeriodType.Monthly - whenever(dateUtils.getNextPeriod(PeriodType.Monthly, calendar.time, 0)) doReturn targetDate + whenever(dateUtils.getNextPeriod(PeriodType.Monthly, calendar.time, 1)) doReturn targetDate runBlocking { val result = createEventUseCase(PROGRAM_ID, ORG_UNIT_ID, PROGRAM_STAGE_ID, ENROLLMENT_ID)