@Override
    public void handle(NotificationDto<ContractCreatedEvent> notification, Map<String, Object> defaultTemplateMap) {
        ContractCreatedEvent event = notification.getPayload();

        if (event.isApprovalRequired()) {
            UserDto recipient = notification.getRecipient();

            mailNotificationService
                    .findTemplateFor(notification.getReason(), recipient.getLocale())
                    .ifPresentOrElse(
                            template -> send(recipient, template, defaultTemplateMap),
                            () -> warnOnce(recipient, notification)
                    );
        }
    }
@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/main/java/io/apiman/manager/api/notifications/email/handlers/ContractApprovalRequestEmailNotification.java