class NotificationSupportedModeService {

    public NotificationModeResponseHeaders resolveNotificationHeaders(List<NotificationSupportedMode> usedModes) {
        List<NotificationSupportedMode> supportedModes = aspspProfileServiceWrapper.getNotificationSupportedModes();

        if (supportedModes.contains(NotificationSupportedMode.NONE)) {
            return new NotificationModeResponseHeaders(null, null);
        }

        if (CollectionUtils.isEmpty(usedModes)) {

            log.info("TPP notification URI is not correct or requested modes are not supported!");

            return new NotificationModeResponseHeaders(false, null);
        }

        return new NotificationModeResponseHeaders(true, getModesAsString(usedModes));

    }

}