@Test public void addCourtDataToModel_CourtType_COMMON_CourtId_NULL() { courtCriteria.setCourtType(CourtType.COMMON); List<SimpleCommonCourt> commonCourts = createSimpleCommonCourts(); when(ccListService.findCommonCourts()).thenReturn(commonCourts); courtDataModelCreator.addCourtDataToModel(courtCriteria, model); verify(model).addAttribute("commonCourts", commonCourts); verify(ccListService).findCommonCourts(); verifyNoMoreInteractions(model, ccListService); verifyZeroInteractions(scListService); }
public void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model) { Preconditions.checkNotNull(courtCriteria); Preconditions.checkNotNull(model); addCommonCourtsToModel(courtCriteria, model); addSupremeCourtChambersToModel(courtCriteria, model); }
CourtDataModelCreator { public void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model) { Preconditions.checkNotNull(courtCriteria); Preconditions.checkNotNull(model); addCommonCourtsToModel(courtCriteria, model); addSupremeCourtChambersToModel(courtCriteria, model); } }
CourtDataModelCreator { public void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model) { Preconditions.checkNotNull(courtCriteria); Preconditions.checkNotNull(model); addCommonCourtsToModel(courtCriteria, model); addSupremeCourtChambersToModel(courtCriteria, model); }  }
CourtDataModelCreator { public void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model) { Preconditions.checkNotNull(courtCriteria); Preconditions.checkNotNull(model); addCommonCourtsToModel(courtCriteria, model); addSupremeCourtChambersToModel(courtCriteria, model); }  void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model); @Autowired void setCcListService(CcListService ccListService); @Autowired void setScListService(ScListService scListService); }
CourtDataModelCreator { public void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model) { Preconditions.checkNotNull(courtCriteria); Preconditions.checkNotNull(model); addCommonCourtsToModel(courtCriteria, model); addSupremeCourtChambersToModel(courtCriteria, model); }  void addCourtDataToModel(CourtCriteria courtCriteria, ModelMap model); @Autowired void setCcListService(CcListService ccListService); @Autowired void setScListService(ScListService scListService);  }