FemaleSterilizationStrategy implements FPMethodStrategy { @Override public void registerEC(FPProductInformation fpInfo) { enrollECToFemaleSterilizationSchedule(fpInfo.entityId(), fpInfo.fpMethodChangeDate()); } @Autowired  FemaleSterilizationStrategy(ScheduleTrackingService scheduleTrackingService, ActionService actionService, ScheduleService scheduleService); @Override void registerEC(FPProductInformation fpInfo); @Override void unEnrollFromPreviousScheduleAsFPMethodChanged(FPProductInformation fpInfo); @Override void enrollToNewScheduleForNewFPMethod(FPProductInformation fpInfo); @Override void renewFPProduct(FPProductInformation fpInfo); @Override void fpFollowup(FPProductInformation fpInfo);  }
@Test public void shouldEnrollInFemaleSterilizationFollowupScheduleOnECRegistration() throws Exception { strategy.registerEC(new FPProductInformation("entity id 1", null, null, null, null, null, null, null, "2012-03-01", "2012-02-01", null, null, null)); verify(scheduleService).enroll("entity id 1", "Female sterilization Followup", "2012-02-01"); }