Mono<NotificationElement> prepareNotificationElement(Subscriber subscriber, Reason reason,
        NotifierDescriptor descriptor) {
        return getLocaleFromSubscriber(subscriber)
            .flatMap(locale -> inferenceTemplate(reason, subscriber, locale))
            .map(notificationContent -> NotificationElement.builder()
                .descriptor(descriptor)
                .reason(reason)
                .subscriber(subscriber)
                .reasonType(notificationContent.reasonType())
                .notificationTitle(notificationContent.title())
                .reasonAttributes(notificationContent.reasonAttributes())
                .notificationRawBody(defaultString(notificationContent.rawBody()))
                .notificationHtmlBody(defaultString(notificationContent.htmlBody()))
                .build()
            );
    }
@Test
    public void testPrepareNotificationElement() {
        var spyNotificationCenter = spy(notificationCenter);

        doReturn(Mono.just(Locale.getDefault()))
            .when(spyNotificationCenter).getLocaleFromSubscriber(any());

        var notificationContent = mock(DefaultNotificationCenter.NotificationContent.class);
        doReturn(Mono.just(notificationContent))
            .when(spyNotificationCenter).inferenceTemplate(any(), any(), any());

        spyNotificationCenter.prepareNotificationElement(any(), any(), any())
            .block();

        verify(spyNotificationCenter).getLocaleFromSubscriber(any());
        verify(spyNotificationCenter).inferenceTemplate(any(), any(), any());
    }