diff --git a/stream-compositions/cursors/transaction-cursor/pom.xml b/stream-compositions/cursors/transaction-cursor/pom.xml
index 7bb5c1ef9..b1ae91b84 100644
--- a/stream-compositions/cursors/transaction-cursor/pom.xml
+++ b/stream-compositions/cursors/transaction-cursor/pom.xml
@@ -17,6 +17,8 @@
true
+ true
+ true
diff --git a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/mapper/TransactionCursorMapperTest.java b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/mapper/TransactionCursorMapperTest.java
index 7c5fcc4f1..1122f06ef 100644
--- a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/mapper/TransactionCursorMapperTest.java
+++ b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/mapper/TransactionCursorMapperTest.java
@@ -77,15 +77,15 @@ void testMapper_Fail() {
private TransactionCursorUpsertRequest getMockModel() {
return new TransactionCursorUpsertRequest()
- .withCursor(new TransactionCursor()
- .withId("3337f8cc-d66d-41b3-a00e-f71ff15d93cq")
- .withArrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cq")
- .withExtArrangementId("5337f8cc-d66d-41b3-a00e-f71ff15d93cq")
- .withLegalEntityId("test-ext-emp")
- .withLastTxnDate("2022-05-24 03:18:19")
- .withStatus(StatusEnum.IN_PROGRESS)
- .withLastTxnIds(List.of("11", "12", "13", "14"))
- .withAdditions(Map.of("key1", "val1")));
+ .cursor(new TransactionCursor()
+ .id("3337f8cc-d66d-41b3-a00e-f71ff15d93cq")
+ .arrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cq")
+ .extArrangementId("5337f8cc-d66d-41b3-a00e-f71ff15d93cq")
+ .legalEntityId("test-ext-emp")
+ .lastTxnDate("2022-05-24 03:18:19")
+ .status(StatusEnum.IN_PROGRESS)
+ .lastTxnIds(List.of("11", "12", "13", "14"))
+ .additions(Map.of("key1", "val1")));
}
private TransactionCursorEntity getMockDomain() {
diff --git a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/repository/TransactionCursorRepositoryImplTest.java b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/repository/TransactionCursorRepositoryImplTest.java
index 447207b65..2f7cc7665 100644
--- a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/repository/TransactionCursorRepositoryImplTest.java
+++ b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/repository/TransactionCursorRepositoryImplTest.java
@@ -13,21 +13,21 @@
import com.backbase.stream.compositions.transaction.cursor.model.TransactionCursorFilterRequest;
import com.backbase.stream.compositions.transaction.cursor.model.TransactionCursorPatchRequest;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.TypedQuery;
+import jakarta.persistence.criteria.CriteriaBuilder;
+import jakarta.persistence.criteria.CriteriaQuery;
+import jakarta.persistence.criteria.CriteriaUpdate;
+import jakarta.persistence.criteria.ParameterExpression;
+import jakarta.persistence.criteria.Path;
+import jakarta.persistence.criteria.Predicate;
+import jakarta.persistence.criteria.Root;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;
import java.util.List;
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.CriteriaUpdate;
-import javax.persistence.criteria.ParameterExpression;
-import javax.persistence.criteria.Path;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -94,15 +94,15 @@ void patchByArrangementId_success() {
int result = transactionCursorCustomRepository
.patchByArrangementId("123", new TransactionCursorPatchRequest()
- .withStatus(StatusEnum.IN_PROGRESS.getValue()).withLastTxnIds("11,12,13,14")
- .withLastTxnDate("2022-06-02 03:18:19"));
+ .status(StatusEnum.IN_PROGRESS.getValue()).lastTxnIds("11,12,13,14")
+ .lastTxnDate("2022-06-02 03:18:19"));
assertEquals(1, result);
verify(entityManager, times(1)).getCriteriaBuilder();
verify(criteriaBuilder, times(1)).createCriteriaUpdate(TransactionCursorEntity.class);
int resultWithOutTxnDate = transactionCursorCustomRepository
.patchByArrangementId("123", new TransactionCursorPatchRequest()
- .withStatus(StatusEnum.IN_PROGRESS.getValue()).withLastTxnIds("11,12,13,14"));
+ .status(StatusEnum.IN_PROGRESS.getValue()).lastTxnIds("11,12,13,14"));
assertEquals(1, resultWithOutTxnDate);
}
@@ -115,8 +115,8 @@ void patchByArrangementId_fail() {
try {
transactionCursorCustomRepository
.patchByArrangementId("123", new TransactionCursorPatchRequest()
- .withStatus(StatusEnum.IN_PROGRESS.getValue()).withLastTxnIds("11,12,13,14")
- .withLastTxnDate("2022-06 03:18:19"));
+ .status(StatusEnum.IN_PROGRESS.getValue()).lastTxnIds("11,12,13,14")
+ .lastTxnDate("2022-06 03:18:19"));
} catch (Exception exception) {
assertThat(exception instanceof ParseException);
}
@@ -141,8 +141,8 @@ void filterCursor_success() throws ParseException {
.thenReturn(typedQuery);
when(typedQuery.getResultList()).thenReturn(List.of(getMockDomain()));
List transactionCursorEntities = transactionCursorCustomRepository
- .filterCursor(new TransactionCursorFilterRequest().withStatus(StatusEnum.SUCCESS
- .getValue()).withLastTxnDate("2022-05-24 03:18:59"));
+ .filterCursor(new TransactionCursorFilterRequest().status(StatusEnum.SUCCESS
+ .getValue()).lastTxnDate("2022-05-24 03:18:59"));
assertNotNull(transactionCursorEntities);
assertThat(transactionCursorEntities.size()).isEqualTo(1);
assertThat(transactionCursorEntities.get(0).getArrangementId())
@@ -162,8 +162,8 @@ void filterCursor_fail() {
.thenReturn(predicate);
try {
transactionCursorCustomRepository
- .filterCursor(new TransactionCursorFilterRequest().withStatus(StatusEnum.SUCCESS
- .getValue()).withLastTxnDate("2022-12 03:18:59"));
+ .filterCursor(new TransactionCursorFilterRequest().status(StatusEnum.SUCCESS
+ .getValue()).lastTxnDate("2022-12 03:18:59"));
} catch (Exception exception) {
assertThat(exception instanceof ParseException);
}
diff --git a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/service/TransactionCursorServiceImplTest.java b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/service/TransactionCursorServiceImplTest.java
index b6ea8fce9..56ff3eef7 100644
--- a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/service/TransactionCursorServiceImplTest.java
+++ b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/core/service/TransactionCursorServiceImplTest.java
@@ -92,9 +92,9 @@ void upsertCursor_success() {
transactionCursorEntity.setId("1234567890");
when(transactionCursorRepository.save(any())).thenReturn(transactionCursorEntity);
TransactionCursorUpsertRequest transactionCursorUpsertRequest = new TransactionCursorUpsertRequest()
- .withCursor(new TransactionCursor().withArrangementId("123"));
+ .cursor(new TransactionCursor().arrangementId("123"));
TransactionCursorUpsertResponse transactionCursorUpsertResponse = new TransactionCursorUpsertResponse()
- .withId("1234567890");
+ .id("1234567890");
StepVerifier
.create(transactionCursorService.upsertCursor(Mono.just(transactionCursorUpsertRequest)))
.expectNext(new ResponseEntity<>
@@ -114,8 +114,8 @@ void patchByArrangementId_success() {
@Test
void patchByArrangementId_error() {
StepVerifier.create(transactionCursorService.patchByArrangementId("123",
- Mono.just(new TransactionCursorPatchRequest().withLastTxnDate("123-123-123")
- .withStatus(StatusEnum.SUCCESS.getValue())))).expectError(ParseException.class);
+ Mono.just(new TransactionCursorPatchRequest().lastTxnDate("123-123-123")
+ .status(StatusEnum.SUCCESS.getValue())))).expectError(ParseException.class);
}
diff --git a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerIT.java b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerIT.java
index 7957761fd..55ffd80e1 100644
--- a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerIT.java
+++ b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerIT.java
@@ -14,8 +14,8 @@
import com.backbase.stream.compositions.transaction.cursor.model.TransactionCursorPatchRequest;
import com.backbase.stream.compositions.transaction.cursor.model.TransactionCursorUpsertRequest;
+import jakarta.persistence.EntityManager;
import java.util.Optional;
-import javax.persistence.EntityManager;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -118,9 +118,9 @@ void patchByArrangementId_Success() {
String arrangementId = "4337f8cc-d66d-41b3-a00e-f71ff15d93cq";
TransactionCursorPatchRequest transactionCursorPatchRequest = new TransactionCursorPatchRequest()
- .withLastTxnDate("2022-05-24 03:18:19")
- .withStatus(StatusEnum.SUCCESS.getValue())
- .withLastTxnIds("11,12,13,14");
+ .lastTxnDate("2022-05-24 03:18:19")
+ .status(StatusEnum.SUCCESS.getValue())
+ .lastTxnIds("11,12,13,14");
webTestClient
.patch().uri("/service-api/v2/cursor/arrangement/{arrangementId}", arrangementId)
@@ -133,7 +133,7 @@ void patchByArrangementId_Success() {
@Test
void filterCursor_Success() {
TransactionCursorFilterRequest transactionCursorFilterRequest = new TransactionCursorFilterRequest()
- .withLastTxnDate("2022-05-24 03:18:59").withStatus(StatusEnum.SUCCESS.getValue());
+ .lastTxnDate("2022-05-24 03:18:59").status(StatusEnum.SUCCESS.getValue());
webTestClient.post().uri("/service-api/v2/cursor/filter")
.contentType(MediaType.APPLICATION_JSON)
.body(Mono.just(transactionCursorFilterRequest), TransactionCursorFilterRequest.class)
@@ -143,11 +143,11 @@ void filterCursor_Success() {
// @Test
void upsertCursor_Success() {
TransactionCursorUpsertRequest transactionCursorUpsertRequest =
- new TransactionCursorUpsertRequest().withCursor(new TransactionCursor()
- .withArrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cq")
- .withExtArrangementId("5337f8cc-d66d-41b3-a00e-f71ff15d93cq")
- .withLegalEntityId("beta-emp-ext")
- .withStatus(StatusEnum.IN_PROGRESS));
+ new TransactionCursorUpsertRequest().cursor(new TransactionCursor()
+ .arrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cq")
+ .extArrangementId("5337f8cc-d66d-41b3-a00e-f71ff15d93cq")
+ .legalEntityId("beta-emp-ext")
+ .status(StatusEnum.IN_PROGRESS));
TransactionCursorEntity transactionCursorEntity = new TransactionCursorEntity();
transactionCursorEntity.setId("3337f8cc-d66d-41b3-a00e-f71ff15d93cq");
diff --git a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerTest.java b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerTest.java
index 6f8bede91..45fe7edf8 100644
--- a/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerTest.java
+++ b/stream-compositions/cursors/transaction-cursor/src/test/java/com/backbase/stream/compositions/transaction/cursor/http/TransactionCursorControllerTest.java
@@ -44,7 +44,7 @@ void testDeleteCursor_success() {
void testFindByArrangementId_success() {
when(transactionCursorService.findByArrangementId(any()))
.thenReturn(Mono.just(new ResponseEntity<>
- (new TransactionCursorResponse().withCursor(new TransactionCursor()), HttpStatus.OK)));
+ (new TransactionCursorResponse().cursor(new TransactionCursor()), HttpStatus.OK)));
Mono> responseEntity = transactionCursorController
.getByArrangementId(anyString(), null);
assertNotNull(responseEntity.block().getBody());
@@ -55,7 +55,7 @@ void testFindByArrangementId_success() {
void testFindById_success() {
when(transactionCursorService.findById(any()))
.thenReturn(Mono.just(new ResponseEntity<>
- (new TransactionCursorResponse().withCursor(new TransactionCursor()), HttpStatus.OK)));
+ (new TransactionCursorResponse().cursor(new TransactionCursor()), HttpStatus.OK)));
Mono> responseEntity = transactionCursorController
.getById(anyString(), null);
assertNotNull(responseEntity.block().getBody());
diff --git a/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerIT.java b/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerIT.java
index daaa1ba00..2ca528bc5 100644
--- a/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerIT.java
+++ b/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerIT.java
@@ -111,11 +111,11 @@ void pullIngestPaymentOrder_Success() throws Exception {
PaymentOrderPullIngestionRequest pullIngestionRequest =
new PaymentOrderPullIngestionRequest()
- .withInternalUserId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
- .withMemberNumber("memberId")
- .withServiceAgreementInternalId("4337f8cc-d66d-41b3-a00e-f71ff15d93cf")
- .withLegalEntityExternalId("leExternalId")
- .withLegalEntityInternalId("leInternalId");
+ .internalUserId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
+ .memberNumber("memberId")
+ .serviceAgreementInternalId("4337f8cc-d66d-41b3-a00e-f71ff15d93cf")
+ .legalEntityExternalId("leExternalId")
+ .legalEntityInternalId("leInternalId");
webTestClient.post().uri(uri)
.contentType(org.springframework.http.MediaType.APPLICATION_JSON)
.body(Mono.just(pullIngestionRequest), PaymentOrderPullIngestionRequest.class).exchange()
@@ -144,12 +144,12 @@ void pushIngestPaymentOrder_Success() throws Exception {
PaymentOrderPushIngestionRequest pushIngestionRequest =
new PaymentOrderPushIngestionRequest()
- .withPaymentOrders(List.of(new PaymentOrderPostRequest()
- .withInternalUserId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
- .withBankReferenceId("bankRefId")
- .withServiceAgreementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cf")
- .withPaymentSetupId("paymentSetupId")
- .withPaymentSubmissionId("paymentSubmissionId")));
+ .paymentOrders(List.of(new PaymentOrderPostRequest()
+ .internalUserId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
+ .bankReferenceId("bankRefId")
+ .serviceAgreementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cf")
+ .paymentSetupId("paymentSetupId")
+ .paymentSubmissionId("paymentSubmissionId")));
webTestClient.post().uri(uri)
.contentType(org.springframework.http.MediaType.APPLICATION_JSON)
diff --git a/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerTest.java b/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerTest.java
index f0580843c..f98497940 100644
--- a/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerTest.java
+++ b/stream-compositions/services/payment-order-composition-service/src/test/java/com/backbase/stream/compositions/paymentorders/http/PaymentOrderControllerTest.java
@@ -55,7 +55,7 @@ void setUp() {
void testPullIngestion_Success() {
Mono requestMono = Mono.just(
- new PaymentOrderPullIngestionRequest().withInternalUserId("internalUserId"));
+ new PaymentOrderPullIngestionRequest().internalUserId("internalUserId"));
List paymentOrderIngestDbsResponses = new ArrayList<>();
paymentOrderIngestDbsResponses.add(new NewPaymentOrderIngestDbsResponse(new PaymentOrderPostResponse()));
diff --git a/stream-compositions/services/pom.xml b/stream-compositions/services/pom.xml
index 593273508..11b50ab5e 100644
--- a/stream-compositions/services/pom.xml
+++ b/stream-compositions/services/pom.xml
@@ -36,11 +36,11 @@
org.springframework.boot
- spring-boot-starter-log4j2
+ spring-boot-starter-security
org.springframework.boot
- spring-boot-starter-security
+ spring-boot-starter-logging
org.springframework.cloud
diff --git a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIngestionServiceImplTest.java b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIngestionServiceImplTest.java
index 35b3bfdd9..2b7ea6265 100644
--- a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIngestionServiceImplTest.java
+++ b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIngestionServiceImplTest.java
@@ -102,7 +102,7 @@ void mockCursorApiForTransactions(TransactionCursorResponse transactionCursorRes
}
when(transactionCursorApi.upsertCursor(any()))
.thenReturn(Mono.just(
- new TransactionCursorUpsertResponse().withId("7337f8cc-d66d-41b3-a00e-f71ff15d93cg")));
+ new TransactionCursorUpsertResponse().id("7337f8cc-d66d-41b3-a00e-f71ff15d93cg")));
when(transactionCursorApi.patchByArrangementId(anyString(), any())).thenReturn(Mono.empty());
}
@@ -120,9 +120,9 @@ TransactionIngestPullRequest mockTransactionIngestPullRequest() {
TransactionCursorResponse mockTransactionCursorResponse() {
return
new TransactionCursorResponse()
- .withCursor(new TransactionCursor().withId("1").withStatus(StatusEnum.IN_PROGRESS)
- .withArrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
- .withLegalEntityId("leInternalId"));
+ .cursor(new TransactionCursor().id("1").status(StatusEnum.IN_PROGRESS)
+ .arrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
+ .legalEntityId("leInternalId"));
}
void mockTransactionService() {
@@ -146,9 +146,11 @@ void ingestionInPullMode_Success() {
TransactionIngestPullRequest transactionIngestPullRequest = mockTransactionIngestPullRequest();
when(transactionIntegrationService.pullTransactions(transactionIngestPullRequest))
- .thenReturn(Flux.just(new TransactionsPostRequestBody().withType("type1").
- withArrangementId("1234").withReference("ref")
- .withExternalArrangementId("externalArrId")));
+ .thenReturn(Flux.just(new TransactionsPostRequestBody()
+ .type("type1")
+ .arrangementId("1234")
+ .reference("ref")
+ .externalArrangementId("externalArrId")));
Mono productIngestResponse = transactionIngestionService
.ingestPull(transactionIngestPullRequest);
@@ -179,9 +181,11 @@ void ingestionInPullModePatchCursor_Success() {
transactionIngestPullRequest.setDateRangeStart(OffsetDateTime.now());
when(transactionIntegrationService.pullTransactions(transactionIngestPullRequest))
- .thenReturn(Flux.just(new TransactionsPostRequestBody().withType("type1").
- withArrangementId("1234").withReference("ref")
- .withExternalArrangementId("externalArrId")));
+ .thenReturn(Flux.just(new TransactionsPostRequestBody()
+ .type("type1")
+ .arrangementId("1234")
+ .reference("ref")
+ .externalArrangementId("externalArrId")));
Mono productIngestResponse = transactionIngestionService
.ingestPull(transactionIngestPullRequest);
@@ -195,15 +199,17 @@ void ingestionInPullModeCursorWithDates_Success() {
mockConfigForTransaction();
mockTransactionService();
TransactionCursorResponse transactionCursorResponse = mockTransactionCursorResponse();
- transactionCursorResponse.getCursor().withLastTxnDate("2022-05-24T03:18:59+01:00")
- .withLastTxnIds(List.of("123", "345"));
+ transactionCursorResponse.getCursor().lastTxnDate("2022-05-24T03:18:59+01:00")
+ .lastTxnIds(List.of("123", "345"));
mockCursorApiForTransactions(transactionCursorResponse, false);
TransactionIngestPullRequest transactionIngestPullRequest = mockTransactionIngestPullRequest();
when(transactionIntegrationService.pullTransactions(transactionIngestPullRequest))
- .thenReturn(Flux.just(new TransactionsPostRequestBody().withType("type1").
- withArrangementId("1234").withReference("ref")
- .withExternalArrangementId("externalArrId")));
+ .thenReturn(Flux.just(new TransactionsPostRequestBody()
+ .type("type1")
+ .arrangementId("1234")
+ .reference("ref")
+ .externalArrangementId("externalArrId")));
Mono productIngestResponse = transactionIngestionService
.ingestPull(transactionIngestPullRequest);
@@ -221,9 +227,10 @@ void ingestionInPullModeUpsertCursor_Success() {
TransactionIngestPullRequest transactionIngestPullRequest = mockTransactionIngestPullRequest();
when(transactionIntegrationService.pullTransactions(transactionIngestPullRequest))
- .thenReturn(Flux.just(new TransactionsPostRequestBody().withType("type1").
- withArrangementId("1234").withReference("ref")
- .withExternalArrangementId("externalArrId")));
+ .thenReturn(Flux.just(new TransactionsPostRequestBody()
+ .type("type1")
+ .arrangementId("1234").reference("ref")
+ .externalArrangementId("externalArrId")));
Mono productIngestResponse = transactionIngestionService
.ingestPull(transactionIngestPullRequest);
@@ -263,9 +270,8 @@ void ingestionInPullModePatchCursor_Success_withDates() {
transactionIngestPullRequest.setDateRangeEnd(OffsetDateTime.now().minusDays(5));
when(transactionIntegrationService.pullTransactions(transactionIngestPullRequest))
- .thenReturn(Flux.just(new TransactionsPostRequestBody().withType("type1").
- withArrangementId("1234").withReference("ref")
- .withExternalArrangementId("externalArrId")));
+ .thenReturn(Flux.just(new TransactionsPostRequestBody().type("type1")
+ .arrangementId("1234").reference("ref").externalArrangementId("externalArrId")));
Mono productIngestResponse = transactionIngestionService
.ingestPull(transactionIngestPullRequest);
diff --git a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIntegrationServiceImplTest.java b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIntegrationServiceImplTest.java
index b4dcdab8a..a423b5fcd 100644
--- a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIntegrationServiceImplTest.java
+++ b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/core/service/impl/TransactionIntegrationServiceImplTest.java
@@ -42,12 +42,12 @@ void setUp() {
void callIntegrationService_Success() {
TransactionsPostRequestBody transactionsPostRequestBody =
- new TransactionsPostRequestBody().withArrangementId("1234");
+ new TransactionsPostRequestBody().arrangementId("1234");
when(transactionIntegrationApi.pullTransactions(any()))
.thenReturn(Mono.just(new PullTransactionsResponse()
- .withTransactions(List.of(new TransactionsPostRequestBody()
- .withArrangementId("1234")))));
+ .transactions(List.of(new TransactionsPostRequestBody()
+ .arrangementId("1234")))));
TransactionIngestPullRequest transactionIngestPullRequest =
new TransactionIngestPullRequest("1234",
diff --git a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerIT.java b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerIT.java
index d7434fa7b..c980d7a8b 100644
--- a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerIT.java
+++ b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerIT.java
@@ -112,8 +112,8 @@ void initializeTransactionCursorServer() throws JsonProcessingException {
.withContentType(MediaType.APPLICATION_JSON)
.withBody(
objectMapper.writeValueAsString(new TransactionCursorResponse()
- .withCursor(new TransactionCursor().withId("1")
- .withArrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg"))
+ .cursor(new TransactionCursor().id("1")
+ .arrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg"))
)
));
@@ -157,10 +157,10 @@ void pullIngestTransactions_Success() throws Exception {
TransactionPullIngestionRequest pullIngestionRequest =
new TransactionPullIngestionRequest()
- .withArrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
- .withBillingCycles(3)
- .withExternalArrangementId("externalArrangementId")
- .withLegalEntityInternalId("leInternalId");
+ .arrangementId("4337f8cc-d66d-41b3-a00e-f71ff15d93cg")
+ .billingCycles(3)
+ .externalArrangementId("externalArrangementId")
+ .legalEntityInternalId("leInternalId");
webTestClient.post().uri(uri)
.contentType(org.springframework.http.MediaType.APPLICATION_JSON)
.body(Mono.just(pullIngestionRequest), TransactionPullIngestionRequest.class).exchange()
@@ -175,9 +175,9 @@ void pushIngestTransactions_Success() throws Exception {
TransactionPushIngestionRequest pushIngestionRequest =
new TransactionPushIngestionRequest()
- .withTransactions(List.of(new TransactionsPostRequestBody().withType("type1").
- withArrangementId("1234").withReference("ref")
- .withExternalArrangementId("externalArrId")));
+ .transactions(List.of(new TransactionsPostRequestBody().type("type1").
+ arrangementId("1234").reference("ref")
+ .externalArrangementId("externalArrId")));
webTestClient.post().uri(uri)
.contentType(org.springframework.http.MediaType.APPLICATION_JSON)
diff --git a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerTest.java b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerTest.java
index 5c14dbce7..aabd2fba5 100644
--- a/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerTest.java
+++ b/stream-compositions/services/transaction-composition-service/src/test/java/com/backbase/stream/compositions/transaction/http/TransactionControllerTest.java
@@ -43,9 +43,9 @@ void setUp() {
void testPullIngestion_Success() {
Mono requestMono = Mono
- .just(new TransactionPullIngestionRequest().withArrangementId("arrangementId")
- .withBillingCycles(3).withExternalArrangementId("extArrangementId")
- .withLegalEntityInternalId("legalEntityId"));
+ .just(new TransactionPullIngestionRequest().arrangementId("arrangementId")
+ .billingCycles(3).externalArrangementId("extArrangementId")
+ .legalEntityInternalId("legalEntityId"));
when(transactionIngestionService.ingestPull(any())).thenReturn(Mono.just(
TransactionIngestResponse.builder()
@@ -60,8 +60,8 @@ void testPullIngestion_Success() {
void testPushIngestion_Success() {
Mono requestMono = Mono.just(
new TransactionPushIngestionRequest()
- .withTransactions(List.of(new TransactionsPostRequestBody()
- .withReference("ref").withType("type").withArrangementId("arrangementId"))));
+ .transactions(List.of(new TransactionsPostRequestBody()
+ .reference("ref").type("type").arrangementId("arrangementId"))));
when(transactionIngestionService.ingestPush(any())).thenReturn(
Mono.just(TransactionIngestResponse.builder()
diff --git a/stream-compositions/test-utils/pom.xml b/stream-compositions/test-utils/pom.xml
index a0d7dce13..42da7b821 100644
--- a/stream-compositions/test-utils/pom.xml
+++ b/stream-compositions/test-utils/pom.xml
@@ -59,11 +59,6 @@
mockserver-netty-no-dependencies
${mock.server.version}
-
- org.mockito
- mockito-inline
- ${mockito.version}
-