@Test public void testNoRequest() { assertThatThrownBy(() -> icfService.findIcfInformationByIcd10Koder(null)) .isExactlyInstanceOf(IllegalArgumentException.class) .hasMessage("Icd10KoderRequest can not be null"); }
@Override @Transactional(readOnly = true) public IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest) { Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest), "Icd10KoderRequest can not be null"); Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest.getIcd10Kod1()), "Icd10KoderRequest must have an icfCode1"); final List<Tuple2<String, Optional<DiagnosInformation>>> collect = List.ofAll(icd10KoderRequest.getIcd10Codes()) .map(this::searchDiagnosInformationByIcd10Kod) .distinctBy(response -> response._1); return convertToResponse(collect); }
IcfServiceImpl extends FmbBaseService implements IcfService { @Override @Transactional(readOnly = true) public IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest) { Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest), "Icd10KoderRequest can not be null"); Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest.getIcd10Kod1()), "Icd10KoderRequest must have an icfCode1"); final List<Tuple2<String, Optional<DiagnosInformation>>> collect = List.ofAll(icd10KoderRequest.getIcd10Codes()) .map(this::searchDiagnosInformationByIcd10Kod) .distinctBy(response -> response._1); return convertToResponse(collect); } }
IcfServiceImpl extends FmbBaseService implements IcfService { @Override @Transactional(readOnly = true) public IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest) { Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest), "Icd10KoderRequest can not be null"); Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest.getIcd10Kod1()), "Icd10KoderRequest must have an icfCode1"); final List<Tuple2<String, Optional<DiagnosInformation>>> collect = List.ofAll(icd10KoderRequest.getIcd10Codes()) .map(this::searchDiagnosInformationByIcd10Kod) .distinctBy(response -> response._1); return convertToResponse(collect); } IcfServiceImpl(
        final IcfTextResource textResource,
        final DiagnosInformationRepository repository); }
IcfServiceImpl extends FmbBaseService implements IcfService { @Override @Transactional(readOnly = true) public IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest) { Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest), "Icd10KoderRequest can not be null"); Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest.getIcd10Kod1()), "Icd10KoderRequest must have an icfCode1"); final List<Tuple2<String, Optional<DiagnosInformation>>> collect = List.ofAll(icd10KoderRequest.getIcd10Codes()) .map(this::searchDiagnosInformationByIcd10Kod) .distinctBy(response -> response._1); return convertToResponse(collect); } IcfServiceImpl(
        final IcfTextResource textResource,
        final DiagnosInformationRepository repository); @Override @Transactional(readOnly = true) IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest); }
IcfServiceImpl extends FmbBaseService implements IcfService { @Override @Transactional(readOnly = true) public IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest) { Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest), "Icd10KoderRequest can not be null"); Preconditions.checkArgument(Objects.nonNull(icd10KoderRequest.getIcd10Kod1()), "Icd10KoderRequest must have an icfCode1"); final List<Tuple2<String, Optional<DiagnosInformation>>> collect = List.ofAll(icd10KoderRequest.getIcd10Codes()) .map(this::searchDiagnosInformationByIcd10Kod) .distinctBy(response -> response._1); return convertToResponse(collect); } IcfServiceImpl(
        final IcfTextResource textResource,
        final DiagnosInformationRepository repository); @Override @Transactional(readOnly = true) IcfResponse findIcfInformationByIcd10Koder(final Icd10KoderRequest icd10KoderRequest);  }