From 0d741559e5b6b07e4290db49e2e2fb93c16231ab Mon Sep 17 00:00:00 2001 From: Antony_Hruschev Date: Mon, 16 Dec 2024 13:33:31 +0400 Subject: [PATCH] UXPROD-5001 refactored --- .../org/folio/circulation/resources/RequestNoticeSender.java | 1 - .../folio/circulation/resources/RequestNoticeSenderTest.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/folio/circulation/resources/RequestNoticeSender.java b/src/main/java/org/folio/circulation/resources/RequestNoticeSender.java index d50e0a9896..3499623d01 100644 --- a/src/main/java/org/folio/circulation/resources/RequestNoticeSender.java +++ b/src/main/java/org/folio/circulation/resources/RequestNoticeSender.java @@ -120,7 +120,6 @@ public Result sendNoticeOnRequestCancelled( log.debug("sendNoticeOnRequestCancelled:: parameters records: {}", () -> records); Request request = records.getRequest(); - // Send the cancellation notice only if the isDcbReRequestCancellation flag is false if (!request.getDcbReRequestCancellationValue()) { if (request.hasItemId()) { sendCancellationNoticeForRequestWithItemId(request); diff --git a/src/test/java/org/folio/circulation/resources/RequestNoticeSenderTest.java b/src/test/java/org/folio/circulation/resources/RequestNoticeSenderTest.java index e9cc4d10dc..a742d50205 100644 --- a/src/test/java/org/folio/circulation/resources/RequestNoticeSenderTest.java +++ b/src/test/java/org/folio/circulation/resources/RequestNoticeSenderTest.java @@ -30,7 +30,7 @@ void shouldNotSendNotificationWhenIsDcbCancellationTrue() { representation.put("isDcbReRequestCancellation", true); requestNoticeSender.sendNoticeOnRequestCancelled( new RequestAndRelatedRecords(Request.from(representation))); - Mockito.verify(immediatePatronNoticeService, times(0)).acceptNoticeEvent(any()); - Mockito.verify(immediatePatronNoticeService, times(0)).sendNotice(any(), any()); + Mockito.verify(immediatePatronNoticeService, times(0)).acceptNoticeEvent(any()); + Mockito.verify(immediatePatronNoticeService, times(0)).sendNotice(any(), any()); } }