class SpiToXs2aAccountDetailsMapper {

    public List<Xs2aCardAccountDetails> mapToXs2aCardAccountDetailsList(List<SpiCardAccountDetails> cardAccountDetails) {
        if (CollectionUtils.isEmpty(cardAccountDetails)) {
            return new ArrayList<>();
        }

        return cardAccountDetails.stream()
                   .map(this::mapToXs2aCardAccountDetails)
                   .collect(Collectors.toList());
    }

}