class SpiToXs2aTrustedBeneficiariesMapper {

    public List<Xs2aTrustedBeneficiaries> mapToXs2aTrustedBeneficiariesList(List<SpiTrustedBeneficiaries> spiTrustedBeneficiaries) {
        if (CollectionUtils.isEmpty(spiTrustedBeneficiaries)) {
            return new ArrayList<>();
        }

        return spiTrustedBeneficiaries.stream()
                   .map(this::mapToXs2aTrustedBeneficiaries)
                   .collect(Collectors.toList());
    }

}