@Test public void testIsDocumentOversizedWhenFileIsOversized() { MultipartFile file = mock(MultipartFile.class); when(file.getSize()).thenReturn((long) 1000000000); assertTrue(sut.isDocumentOversized(file)); }
@Override public boolean isDocumentOversized(MultipartFile file) { if (file.getSize() > maxFileSize) return true; return false; }
ClinicalDocumentServiceImpl implements ClinicalDocumentService,
		InitializingBean { @Override public boolean isDocumentOversized(MultipartFile file) { if (file.getSize() > maxFileSize) return true; return false; } }
ClinicalDocumentServiceImpl implements ClinicalDocumentService,
		InitializingBean { @Override public boolean isDocumentOversized(MultipartFile file) { if (file.getSize() > maxFileSize) return true; return false; } ClinicalDocumentServiceImpl(
			String maxFileSize,
			String permittedExtensions,
			ClinicalDocumentRepository clinicalDocumentRepository,
			ClinicalDocumentTypeCodeRepository clinicalDocumentTypeCodeRepository,
			ModelMapper modelMapper, PatientRepository patientRepository,
			UserContext userContext, Validator validator); }
ClinicalDocumentServiceImpl implements ClinicalDocumentService,
		InitializingBean { @Override public boolean isDocumentOversized(MultipartFile file) { if (file.getSize() > maxFileSize) return true; return false; } ClinicalDocumentServiceImpl(
			String maxFileSize,
			String permittedExtensions,
			ClinicalDocumentRepository clinicalDocumentRepository,
			ClinicalDocumentTypeCodeRepository clinicalDocumentTypeCodeRepository,
			ModelMapper modelMapper, PatientRepository patientRepository,
			UserContext userContext, Validator validator); @Override void afterPropertiesSet(); @Override long countAllClinicalDocuments(); @Override void deleteClinicalDocument(ClinicalDocumentDto clinicalDocumentDto); @Override ClinicalDocument findClinicalDocument(Long id); @Override List<ClinicalDocument> findAllClinicalDocuments(); @Override List<ClinicalDocument> findClinicalDocumentEntries(int firstResult,
			int maxResults); @Override void saveClinicalDocument(ClinicalDocumentDto clinicalDocumentDto); @Override ClinicalDocument updateClinicalDocument(
			ClinicalDocument clinicalDocument); @Override ClinicalDocumentDto findClinicalDocumentDto(long documentId); @Override List<ClinicalDocument> findByPatient(Patient patient); @Override List<ClinicalDocument> findByPatientId(long patientId); @Override List<ClinicalDocumentDto> findDtoByPatientDto(
			PatientProfileDto patientDto); @Override boolean isDocumentBelongsToThisUser(
			ClinicalDocumentDto clinicalDocumentDto); @Override boolean isDocumentOversized(MultipartFile file); @Override boolean isDocumentExtensionPermitted(MultipartFile file); }
ClinicalDocumentServiceImpl implements ClinicalDocumentService,
		InitializingBean { @Override public boolean isDocumentOversized(MultipartFile file) { if (file.getSize() > maxFileSize) return true; return false; } ClinicalDocumentServiceImpl(
			String maxFileSize,
			String permittedExtensions,
			ClinicalDocumentRepository clinicalDocumentRepository,
			ClinicalDocumentTypeCodeRepository clinicalDocumentTypeCodeRepository,
			ModelMapper modelMapper, PatientRepository patientRepository,
			UserContext userContext, Validator validator); @Override void afterPropertiesSet(); @Override long countAllClinicalDocuments(); @Override void deleteClinicalDocument(ClinicalDocumentDto clinicalDocumentDto); @Override ClinicalDocument findClinicalDocument(Long id); @Override List<ClinicalDocument> findAllClinicalDocuments(); @Override List<ClinicalDocument> findClinicalDocumentEntries(int firstResult,
			int maxResults); @Override void saveClinicalDocument(ClinicalDocumentDto clinicalDocumentDto); @Override ClinicalDocument updateClinicalDocument(
			ClinicalDocument clinicalDocument); @Override ClinicalDocumentDto findClinicalDocumentDto(long documentId); @Override List<ClinicalDocument> findByPatient(Patient patient); @Override List<ClinicalDocument> findByPatientId(long patientId); @Override List<ClinicalDocumentDto> findDtoByPatientDto(
			PatientProfileDto patientDto); @Override boolean isDocumentBelongsToThisUser(
			ClinicalDocumentDto clinicalDocumentDto); @Override boolean isDocumentOversized(MultipartFile file); @Override boolean isDocumentExtensionPermitted(MultipartFile file);  }