class SpiToXs2aAccountDetailsMapper {

    public List<Xs2aAccountDetails> mapToXs2aAccountDetailsList(List<SpiAccountDetails> accountDetails) {
        if (CollectionUtils.isEmpty(accountDetails)) {
            return new ArrayList<>();
        }

        return accountDetails.stream()
                   .map(this::mapToXs2aAccountDetails)
                   .collect(Collectors.toList());
    }

}