ConceptCodeServiceImpl implements ConceptCodeService { @Override public List<ConceptCodeDto> findAll() { logger.debug("Finding all conceptCodes"); List<ConceptCode> conceptCodes = conceptCodeRepository.findAll(); return valueSetMgmtHelper .convertConceptCodeEntitiesToDtos(conceptCodes); } ConceptCodeServiceImpl(int conceptCodePageSize,
			ConceptCodeRepository conceptCodeRepository,
			ValueSetRepository valueSetRepository,
			CodeSystemRepository codeSystemRepository,
			CodeSystemVersionRepository codeSystemVersionRepository,
			ConceptCodeValueSetRepository conceptCodeValueSetRepository,
			ValueSetMgmtHelper valueSetMgmtHelper); @Override @Transactional(rollbackFor = ConceptCodeNotFoundException.class) ConceptCodeDto delete(Long conceptCodeId); @Override ConceptCodeDto findById(Long id); @Override @Transactional(rollbackFor = ConceptCodeNotFoundException.class) ConceptCodeDto update(ConceptCodeDto updated); @Override List<ConceptCodeDto> findAll(); @Override Map<String, Object> findAll(int pageNumber); @Override Map<String, Object> findAllByCode(String searchTerm,
			String codeSystem, String codeSystemVersion, String valueSetName,
			int pageNumber); @Override Map<String, Object> findAllByName(String searchTerm,
			String codeSystem, String codeSystemVersion, String valueSetName,
			int pageNumber); @Override ConceptCodeVSCSDto create(); @Override @Transactional ConceptCodeDto create(ConceptCodeDto created); @Override @Transactional(rollbackFor = DataIntegrityViolationException.class) ConceptCodeDto conceptCodeBatchUpload(ConceptCodeDto conceptCodeDto,
			MultipartFile file, String codeSystemId, Long codeSystemVersionId,
			List<Long> valueSetIds); @Override List<ValueSet> findValueSetsByCodeSystem(String codeSystem,
			String codeSystemVersion); final int CONCEPT_CODE_PAGE_SIZE; }
@Test public void testfindAll() { List<ConceptCode> conceptCodes = mock(List.class); when(conceptCodeRepository.findAll()).thenReturn(conceptCodes); List<ConceptCodeDto> conceptCodeDtos = new ArrayList(); ConceptCodeDto conceptCodeDto = mock(ConceptCodeDto.class); conceptCodeDtos.add(conceptCodeDto); when(valueSetMgmtHelper.convertConceptCodeEntitiesToDtos(conceptCodes)) .thenReturn(conceptCodeDtos); assertEquals(conceptCodeServiceImpl.findAll(), conceptCodeDtos); }