@Test public void shouldReturnAdminCounters() throws IOException { given(countersRepo.surfaceTreatmentProtocolsCount()).willReturn(SURFACE_TREATMENT_PROTOCOL_COUNT); given(countersRepo.negativeStainProtocolsCount()).willReturn(NEGATIVE_STAIN_PROTOCOL_COUNT); given(countersRepo.vitrificationProtocolsCount()).willReturn(VITRIFICATION_PROTOCOL_COUNT); given(countersRepo.surfaceTreatmentMachinesCount()).willReturn(SURFACE_TREATMENT_MACHINES_COUNT); given(countersRepo.vitrificationMachinesCount()).willReturn(VITRIFICATION_MACHINES_COUNT); given(countersRepo.cryoStorageDevicesCount()).willReturn(CRYO_DEVICE_COUNT); given(countersRepo.microscopesCount()).willReturn(MICROSCOPES_COUNT); given(countersRepo.electronDetectorsCount()).willReturn(ELECTRON_DETECTORS_COUNT); given(countersRepo.sampleHoldersCount()).willReturn(SAMPLE_HOLDERS_COUNT); given(countersRepo.gridTypesCount()).willReturn(GRID_TYPES_COUNT); given(countersRepo.blottingPapersCount()).willReturn(BLOTTING_COUNT); given(countersRepo.projectsCount()).willReturn(PROJECTS_COUNT); given(countersRepo.imageProcessingSoftwareCount()).willReturn(IMAGE_PROCESSING_SOFTWARE_COUNT); final AdminPanelCounters adminPanelCounters = this.underTest.calculateAdminCounters(); assertEquals(SURFACE_TREATMENT_PROTOCOL_COUNT, adminPanelCounters.getSurfaceTreatmentProtocolsCount() .intValue()); assertEquals(NEGATIVE_STAIN_PROTOCOL_COUNT, adminPanelCounters.getNegativeStainProtocolsCount() .intValue()); assertEquals(VITRIFICATION_PROTOCOL_COUNT, adminPanelCounters.getVitrificationProtocolsCount() .intValue()); assertEquals(SURFACE_TREATMENT_MACHINES_COUNT, adminPanelCounters.getSurfaceTreatmentMachinesCount() .intValue()); assertEquals(VITRIFICATION_MACHINES_COUNT, adminPanelCounters.getVitrificationMachinesCount() .intValue()); assertEquals(CRYO_DEVICE_COUNT, adminPanelCounters.getCryoStorageDevicesCount() .intValue()); assertEquals(MICROSCOPES_COUNT, adminPanelCounters.getMicroscopesCount() .intValue()); assertEquals(ELECTRON_DETECTORS_COUNT, adminPanelCounters.getElectronDetectorsCount() .intValue()); assertEquals(SAMPLE_HOLDERS_COUNT, adminPanelCounters.getSampleHoldersCount() .intValue()); assertEquals(GRID_TYPES_COUNT, adminPanelCounters.getGridTypesCount() .intValue()); assertEquals(BLOTTING_COUNT, adminPanelCounters.getBlottingPapersCount() .intValue()); assertEquals(PROJECTS_COUNT, adminPanelCounters.getProjectsCount() .intValue()); assertEquals(IMAGE_PROCESSING_SOFTWARE_COUNT, adminPanelCounters.getImageProcessingSoftwareCount() .intValue()); }
public AdminPanelCounters calculateAdminCounters() { return AdminPanelCounters.builder() .surfaceTreatmentProtocolsCount(this.repo.surfaceTreatmentProtocolsCount()) .negativeStainProtocolsCount(this.repo.negativeStainProtocolsCount()) .vitrificationProtocolsCount(this.repo.vitrificationProtocolsCount()) .surfaceTreatmentMachinesCount(this.repo.surfaceTreatmentMachinesCount()) .vitrificationMachinesCount(this.repo.vitrificationMachinesCount()) .cryoStorageDevicesCount(this.repo.cryoStorageDevicesCount()) .microscopesCount(this.repo.microscopesCount()) .electronDetectorsCount(this.repo.electronDetectorsCount()) .sampleHoldersCount(this.repo.sampleHoldersCount()) .gridTypesCount(this.repo.gridTypesCount()) .blottingPapersCount(this.repo.blottingPapersCount()) .imageProcessingSoftwareCount(this.repo.imageProcessingSoftwareCount()) .projectsCount(this.repo.projectsCount()) .build(); }
AdminEntitiesCounterService { public AdminPanelCounters calculateAdminCounters() { return AdminPanelCounters.builder() .surfaceTreatmentProtocolsCount(this.repo.surfaceTreatmentProtocolsCount()) .negativeStainProtocolsCount(this.repo.negativeStainProtocolsCount()) .vitrificationProtocolsCount(this.repo.vitrificationProtocolsCount()) .surfaceTreatmentMachinesCount(this.repo.surfaceTreatmentMachinesCount()) .vitrificationMachinesCount(this.repo.vitrificationMachinesCount()) .cryoStorageDevicesCount(this.repo.cryoStorageDevicesCount()) .microscopesCount(this.repo.microscopesCount()) .electronDetectorsCount(this.repo.electronDetectorsCount()) .sampleHoldersCount(this.repo.sampleHoldersCount()) .gridTypesCount(this.repo.gridTypesCount()) .blottingPapersCount(this.repo.blottingPapersCount()) .imageProcessingSoftwareCount(this.repo.imageProcessingSoftwareCount()) .projectsCount(this.repo.projectsCount()) .build(); } }
AdminEntitiesCounterService { public AdminPanelCounters calculateAdminCounters() { return AdminPanelCounters.builder() .surfaceTreatmentProtocolsCount(this.repo.surfaceTreatmentProtocolsCount()) .negativeStainProtocolsCount(this.repo.negativeStainProtocolsCount()) .vitrificationProtocolsCount(this.repo.vitrificationProtocolsCount()) .surfaceTreatmentMachinesCount(this.repo.surfaceTreatmentMachinesCount()) .vitrificationMachinesCount(this.repo.vitrificationMachinesCount()) .cryoStorageDevicesCount(this.repo.cryoStorageDevicesCount()) .microscopesCount(this.repo.microscopesCount()) .electronDetectorsCount(this.repo.electronDetectorsCount()) .sampleHoldersCount(this.repo.sampleHoldersCount()) .gridTypesCount(this.repo.gridTypesCount()) .blottingPapersCount(this.repo.blottingPapersCount()) .imageProcessingSoftwareCount(this.repo.imageProcessingSoftwareCount()) .projectsCount(this.repo.projectsCount()) .build(); } protected  AdminEntitiesCounterService(@NonNull final AdminEntitiesCounterRepository repo); }
AdminEntitiesCounterService { public AdminPanelCounters calculateAdminCounters() { return AdminPanelCounters.builder() .surfaceTreatmentProtocolsCount(this.repo.surfaceTreatmentProtocolsCount()) .negativeStainProtocolsCount(this.repo.negativeStainProtocolsCount()) .vitrificationProtocolsCount(this.repo.vitrificationProtocolsCount()) .surfaceTreatmentMachinesCount(this.repo.surfaceTreatmentMachinesCount()) .vitrificationMachinesCount(this.repo.vitrificationMachinesCount()) .cryoStorageDevicesCount(this.repo.cryoStorageDevicesCount()) .microscopesCount(this.repo.microscopesCount()) .electronDetectorsCount(this.repo.electronDetectorsCount()) .sampleHoldersCount(this.repo.sampleHoldersCount()) .gridTypesCount(this.repo.gridTypesCount()) .blottingPapersCount(this.repo.blottingPapersCount()) .imageProcessingSoftwareCount(this.repo.imageProcessingSoftwareCount()) .projectsCount(this.repo.projectsCount()) .build(); } protected  AdminEntitiesCounterService(@NonNull final AdminEntitiesCounterRepository repo); AdminPanelCounters calculateAdminCounters(); }
AdminEntitiesCounterService { public AdminPanelCounters calculateAdminCounters() { return AdminPanelCounters.builder() .surfaceTreatmentProtocolsCount(this.repo.surfaceTreatmentProtocolsCount()) .negativeStainProtocolsCount(this.repo.negativeStainProtocolsCount()) .vitrificationProtocolsCount(this.repo.vitrificationProtocolsCount()) .surfaceTreatmentMachinesCount(this.repo.surfaceTreatmentMachinesCount()) .vitrificationMachinesCount(this.repo.vitrificationMachinesCount()) .cryoStorageDevicesCount(this.repo.cryoStorageDevicesCount()) .microscopesCount(this.repo.microscopesCount()) .electronDetectorsCount(this.repo.electronDetectorsCount()) .sampleHoldersCount(this.repo.sampleHoldersCount()) .gridTypesCount(this.repo.gridTypesCount()) .blottingPapersCount(this.repo.blottingPapersCount()) .imageProcessingSoftwareCount(this.repo.imageProcessingSoftwareCount()) .projectsCount(this.repo.projectsCount()) .build(); } protected  AdminEntitiesCounterService(@NonNull final AdminEntitiesCounterRepository repo); AdminPanelCounters calculateAdminCounters();  }