From 2202cbd03c388ae78cc185dfb221ee66dc29fb25 Mon Sep 17 00:00:00 2001 From: Luca Consalvi Date: Thu, 12 Dec 2024 18:04:41 +0100 Subject: [PATCH] remove some issues --- .../rtp/activator/controller/SendAPIControllerImpl.java | 4 ++-- .../gov/pagopa/rtp/activator/domain/rtp/RtpMapperTest.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/it/gov/pagopa/rtp/activator/controller/SendAPIControllerImpl.java b/src/main/java/it/gov/pagopa/rtp/activator/controller/SendAPIControllerImpl.java index 35d91ae..ce5a2a8 100644 --- a/src/main/java/it/gov/pagopa/rtp/activator/controller/SendAPIControllerImpl.java +++ b/src/main/java/it/gov/pagopa/rtp/activator/controller/SendAPIControllerImpl.java @@ -27,8 +27,8 @@ public SendAPIControllerImpl(SendRTPService sendRTPService, RtpMapper rtpMapper) public Mono> createRtp(Mono createRtpDto, ServerWebExchange exchange) { return createRtpDto - .map(rtpDto -> rtpMapper.toRtp(rtpDto)) - .flatMap(rtp -> sendRTPService.send(rtp)) + .map(rtpMapper::toRtp) + .flatMap(sendRTPService::send) .thenReturn(ResponseEntity.status(201).build()); } } diff --git a/src/test/java/it/gov/pagopa/rtp/activator/domain/rtp/RtpMapperTest.java b/src/test/java/it/gov/pagopa/rtp/activator/domain/rtp/RtpMapperTest.java index 13ba5fd..2d25abd 100644 --- a/src/test/java/it/gov/pagopa/rtp/activator/domain/rtp/RtpMapperTest.java +++ b/src/test/java/it/gov/pagopa/rtp/activator/domain/rtp/RtpMapperTest.java @@ -8,16 +8,16 @@ import java.time.LocalDate; import static org.assertj.core.api.Assertions.assertThat; -public class RtpMapperTest { +class RtpMapperTest { private RtpMapper rtpMapper; @BeforeEach - public void setUp() { + void setUp() { rtpMapper = new RtpMapper(); } @Test - public void testToRtp() { + void testToRtp() { CreateRtpDto createRtpDto = new CreateRtpDto(); createRtpDto.setNoticeNumber("12345"); createRtpDto.setAmount(BigDecimal.valueOf(100));