From afbe2e7a4b2c727a6e2eb5f177c3ac2e424e158e Mon Sep 17 00:00:00 2001 From: Ruban Date: Tue, 3 Dec 2024 16:22:28 +0000 Subject: [PATCH] DTSCCI-1005 fix fee register pact (#5854) * DTSCCI-1005: Fix fee range pact test --- .../hmcts/reform/civil/BaseContractTest.java | 7 + .../civil/CaseAssignmentApiConsumerTest.java | 6 +- .../CmcClaimsForClaimantApiConsumerTest.java | 2 +- .../CmcClaimsForDefendantApiConsumerTest.java | 2 +- .../CmcDefendantLinkedApiConsumerTest.java | 2 +- .../reform/civil/DocmosisApiConsumerTest.java | 5 +- .../civil/FeesLookupApiConsumerTest.java | 16 +- .../civil/FeesRangeGroupApiConsumerTest.java | 133 +- .../LocationReferenceDataApiConsumerTest.java | 15 +- .../civil/NewBundleApiConsumerTest.java | 5 +- .../reform/civil/PaymentsApiConsumerTest.java | 165 +- .../civil/StitchBundleApiConsumerTest.java | 6 +- .../reform/civil/model/FeeVersionDto.java | 2 + .../reform/civil/service/PaymentsService.java | 58 +- .../civil/sampledata/CaseDataBuilder.java | 1904 +++++++++-------- .../civil/service/PaymentsServiceTest.java | 1 - 16 files changed, 1161 insertions(+), 1168 deletions(-) diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/BaseContractTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/BaseContractTest.java index d4b66970e8f..bfd1be456cf 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/BaseContractTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/BaseContractTest.java @@ -2,11 +2,14 @@ import au.com.dius.pact.consumer.junit5.PactConsumerTestExt; import com.fasterxml.jackson.databind.ObjectMapper; +import org.json.JSONException; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; +import java.io.IOException; + @ExtendWith(PactConsumerTestExt.class) @ActiveProfiles("integration-test") @SpringBootTest @@ -19,4 +22,8 @@ public class BaseContractTest { @Autowired protected ObjectMapper objectMapper; + + protected String createJsonObject(Object obj) throws JSONException, IOException { + return objectMapper.writeValueAsString(obj); + } } diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/CaseAssignmentApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/CaseAssignmentApiConsumerTest.java index 3b6078b1a1b..42d81e4e771 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/CaseAssignmentApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/CaseAssignmentApiConsumerTest.java @@ -36,13 +36,13 @@ public class CaseAssignmentApiConsumerTest extends BaseContractTest { @Autowired private CaseAssignmentApi caseAssignmentApi; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getUserRoles(PactDslWithProvider builder) throws JSONException, IOException { return buildGetUserRolesResponsePact(builder); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact removeCaseUserRoles(PactDslWithProvider builder) throws JSONException, IOException { return buildRemoveUserRolesResponsePact(builder); @@ -95,7 +95,7 @@ private RequestResponsePact buildRemoveUserRolesResponsePact(PactDslWithProvider .path(ENDPOINT) .headers(SERVICE_AUTHORIZATION_HEADER, SERVICE_AUTH_TOKEN, AUTHORIZATION_HEADER, AUTHORIZATION_TOKEN) .method(HttpMethod.DELETE.toString()) - .body(objectMapper.writeValueAsString(getRequestEntity())) + .body(createJsonObject(getRequestEntity())) .willRespondWith() .matchHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .body(buildRemoveUserRolesResponseBody()) diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForClaimantApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForClaimantApiConsumerTest.java index 245e6d38826..295ec15e2ea 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForClaimantApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForClaimantApiConsumerTest.java @@ -37,7 +37,7 @@ public class CmcClaimsForClaimantApiConsumerTest extends BaseContractTest { @Autowired private ClaimStoreApi claimStoreApi; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getClaimsForClaimant(PactDslWithProvider builder) throws JSONException, IOException { return buildClaimsForClaimantPact(builder); diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForDefendantApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForDefendantApiConsumerTest.java index f92f1a0435d..f9050163577 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForDefendantApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcClaimsForDefendantApiConsumerTest.java @@ -37,7 +37,7 @@ public class CmcClaimsForDefendantApiConsumerTest extends BaseContractTest { @Autowired private ClaimStoreApi claimStoreApi; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getClaimsForDefendant(PactDslWithProvider builder) throws JSONException, IOException { return buildClaimsForDefendantPact(builder); diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcDefendantLinkedApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcDefendantLinkedApiConsumerTest.java index 4acabae8670..95215105d2e 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcDefendantLinkedApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/CmcDefendantLinkedApiConsumerTest.java @@ -39,7 +39,7 @@ public class CmcDefendantLinkedApiConsumerTest extends BaseContractTest { @Autowired private ClaimStoreApi claimStoreApi; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getClaimsForDefendant(PactDslWithProvider builder) throws JSONException, IOException { return buildClaimsForDefendantPact(builder); diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/DocmosisApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/DocmosisApiConsumerTest.java index f4ed76c384d..5ded6ddf186 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/DocmosisApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/DocmosisApiConsumerTest.java @@ -30,7 +30,7 @@ public class DocmosisApiConsumerTest extends BaseContractTest { @Autowired private DocmosisApiClient docmosisApiClient; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact postCreateDocumentRequest(PactDslWithProvider builder) throws JSONException, IOException { return buildCreateDocumentResponsePact(builder); @@ -73,7 +73,4 @@ private DocmosisRequest getDocmosisRequest() { .build(); } - private String createJsonObject(Object obj) throws JSONException, IOException { - return objectMapper.writeValueAsString(obj); - } } diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesLookupApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesLookupApiConsumerTest.java index b7f88285141..3c9fd8801af 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesLookupApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesLookupApiConsumerTest.java @@ -67,7 +67,7 @@ public class FeesLookupApiConsumerTest extends BaseContractTest { @MockBean private FeatureToggleService featureToggleService; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForHearingSmallClaims(PactDslWithProvider builder) throws JSONException { return buildLookupFeeWithAmountPact( builder, @@ -84,7 +84,7 @@ public RequestResponsePact getFeeForHearingSmallClaims(PactDslWithProvider build ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForHearingFastTrackClaims(PactDslWithProvider builder) throws JSONException { return buildLookupFeeWithAmountPact( builder, @@ -101,7 +101,7 @@ public RequestResponsePact getFeeForHearingFastTrackClaims(PactDslWithProvider b ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForHearingMultiClaims(PactDslWithProvider builder) throws JSONException { return buildLookupFeeWithAmountPact( builder, @@ -118,7 +118,7 @@ public RequestResponsePact getFeeForHearingMultiClaims(PactDslWithProvider build ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForMoneyClaim(PactDslWithProvider builder) throws JSONException { return buildLookupFeeWithAmountPact( builder, @@ -135,7 +135,7 @@ public RequestResponsePact getFeeForMoneyClaim(PactDslWithProvider builder) thro ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForMoneyClaimWithoutKeyword(PactDslWithProvider builder) throws JSONException { return buildLookupFeeWithoutKeywordPact( builder, @@ -151,7 +151,7 @@ public RequestResponsePact getFeeForMoneyClaimWithoutKeyword(PactDslWithProvider ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForGAWithNotice(PactDslWithProvider builder) throws JSONException { return buildLookupFeePact( builder, @@ -167,7 +167,7 @@ public RequestResponsePact getFeeForGAWithNotice(PactDslWithProvider builder) th ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForConsentWithOrWithout(PactDslWithProvider builder) throws JSONException { return buildLookupFeePact( builder, @@ -183,7 +183,7 @@ public RequestResponsePact getFeeForConsentWithOrWithout(PactDslWithProvider bui ); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getFeeForAppToVaryOrSuspend(PactDslWithProvider builder) throws JSONException { return buildLookupFeePact( builder, diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesRangeGroupApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesRangeGroupApiConsumerTest.java index 1df7e37e4b1..8fc44571ebb 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesRangeGroupApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/FeesRangeGroupApiConsumerTest.java @@ -19,6 +19,8 @@ import uk.gov.hmcts.reform.civil.model.Fee2Dto; import uk.gov.hmcts.reform.civil.service.FeesClientService; +import java.math.BigDecimal; + import static au.com.dius.pact.consumer.dsl.LambdaDsl.newJsonArray; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; @@ -41,7 +43,7 @@ public class FeesRangeGroupApiConsumerTest extends BaseContractTest { @Autowired private FeesConfiguration feesConfiguration; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getRangeGroupFees(PactDslWithProvider builder) throws JSONException { return buildLookupRangeGroupFeesResponsePact( builder, @@ -55,7 +57,27 @@ public RequestResponsePact getRangeGroupFees(PactDslWithProvider builder) throws public void verifyRangeGroupFees() { Fee2Dto[] fee = feesClientService.findRangeGroup(feesConfiguration.getChannel(), feesConfiguration.getEvent() ); - assertThat(fee[0].getCode(), is(equalTo("code"))); + assertThat(fee[0].getCode(), is(equalTo("FEE0209"))); + assertThat(fee[0].getFeeType(), is(equalTo("FEETYPE"))); + assertThat(fee[0].getKeyword(), is(equalTo("MoneyClaim"))); + assertThat(fee[0].getMinRange(), is(equalTo(BigDecimal.valueOf(100)))); + assertThat(fee[0].getMaxRange(), is(equalTo(BigDecimal.valueOf(100)))); + assertThat(fee[0].getRangeUnit(), is(equalTo("GBP"))); + assertThat(fee[0].getUnspecifiedClaimAmount(), is(equalTo(true))); + assertThat(fee[0].getFeeVersions().get(0).getVersion(), is(equalTo(2))); + assertThat(fee[0].getFeeVersions().get(0).getAuthor(), is(equalTo("124756"))); + assertThat(fee[0].getFeeVersions().get(0).getApprovedBy(), is(equalTo("39907"))); + assertThat(fee[0].getFeeVersions().get(0).getDescription(), is(equalTo("Counter Claim - 5000.01 up to 10000 GBP"))); + assertThat(fee[0].getFeeVersions().get(0).getStatus(), is(equalTo("approved"))); + assertThat(fee[0].getFeeVersions().get(0).getValidFrom().toString(), is(equalTo("2015-03-09T00:00Z"))); + assertThat(fee[0].getFeeVersions().get(0).getValidTo().toString(), is(equalTo("2022-03-09T00:00Z"))); + assertThat(fee[0].getFeeVersions().get(0).getFlatAmount().getAmount(), is(equalTo(BigDecimal.valueOf(455)))); + assertThat(fee[0].getFeeVersions().get(0).getMemoLine(), is(equalTo("RECEIPT OF FEES - Civil issue money"))); + assertThat(fee[0].getFeeVersions().get(0).getStatutoryInstrument(), is(equalTo("2014 No 874"))); + assertThat(fee[0].getFeeVersions().get(0).getSiRefId(), is(equalTo("1.1h"))); + assertThat(fee[0].getFeeVersions().get(0).getNaturalAccountCode(), is(equalTo("4481102133"))); + assertThat(fee[0].getFeeVersions().get(0).getPercentageAmount().getPercentage(), is(equalTo(BigDecimal.valueOf(5)))); + assertThat(fee[0].getFeeVersions().get(0).getDirection(), is(equalTo("enhanced"))); } private RequestResponsePact buildLookupRangeGroupFeesResponsePact(PactDslWithProvider builder, @@ -82,85 +104,60 @@ private RequestResponsePact buildLookupRangeGroupFeesResponsePact(PactDslWithPro private DslPart buildRangeGroupFeesResponseBody() { return newJsonArray(response -> response .object(feeDto -> feeDto - .object("applicantType", applicantType -> + .object("applicant_type", applicantType -> applicantType - .stringMatcher("creationTime", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringMatcher("lastUpdated", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringType("name", "name")) - .object("channelType", channelTypeDto -> + .stringValue("name", "all")) + .object("channel_type", channelTypeDto -> channelTypeDto - .stringMatcher("creationTime", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringMatcher("lastUpdated", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringType("name", "name")) - .stringType("code", "code") - .object("currentVersion", feeVersionDto -> + .stringValue("name", "default")) + .stringValue("code", "FEE0209") + .object("current_version", feeVersionDto -> getFeeVersionDto(feeVersionDto)) - .object("eventType", eventType -> eventType - .stringMatcher("creationTime", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringMatcher("lastUpdated", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringType("name", "name")) - .stringType("feeType", "FEETYPE") - .minArrayLike("feeVersions", 1, feeVersions -> getFeeVersionDto(feeVersions)) + .object("event_type", eventType -> eventType + .stringValue("name", "issue")) + .stringValue("fee_type", "FEETYPE") + .minArrayLike("fee_versions", 1, feeVersions -> getFeeVersionDto(feeVersions)) .object("jurisdiction1", jurisdiction1 -> jurisdiction1 - .stringType("name", "name")) + .stringValue("name", "civil")) .object("jurisdiction2", jurisdiction2 -> jurisdiction2 - .stringType("name", "name")) - .stringType("keyword", "keyword") - .object("matchingVersion", feeVersionDto -> + .stringValue("name", "county court")) + .stringValue("keyword", "MoneyClaim") + .object("matching_version", feeVersionDto -> getFeeVersionDto(feeVersionDto)) - .numberType("maxRange", "maxRange") - .numberType("minRange", "minRange") - .stringType("rangeUnit", "rangeUnit") - .object("serviceType", serviceType -> serviceType - .stringMatcher("creationTime", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringMatcher("lastUpdated", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringType("name", "name")) - .booleanType("unspecifiedClaimAmount") + .numberType("max_range", 100) + .numberType("min_range", 100) + .stringValue("range_unit", "GBP") + .object("service_type", serviceType -> serviceType + .stringValue("name", "civil money claims")) + .booleanType("unspecified_claim_amount") )).build(); } private static LambdaDslObject getFeeVersionDto(LambdaDslObject feeVersionDto) { + return feeVersionDto - .stringType("approvedBy", "approvedBy") - .stringType("author", "author") - .stringType("description", "description") - .stringType("direction", "direction") - .object("flatAmount", flatAmount -> + .stringType("approvedBy", "39907") + .stringType("author", "124756") + .stringType("description", "Counter Claim - 5000.01 up to 10000 GBP") + .stringType("direction", "enhanced") + .object("flat_amount", flatAmount -> flatAmount - .numberType("amount")) - .stringType("memoLine", "memoLine") - .stringType("naturalAccountCode", "naturalAccountCode") - .object("percentageAmount", percentageAmount -> percentageAmount - .numberType("percentage")) - .stringType("siRefId", "siRefId") - .stringType("status", "status") - .stringType("statutoryInstrument", "statutoryInstrument") - .stringMatcher("validFrom", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .stringMatcher("validTo", - "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,6})$", - "2020-10-06T18:54:48.785000") - .numberType("version") - .object("volumeAmount", volumeAmount -> volumeAmount - .numberType("amount")); + .numberType("amount", 455)) + .stringType("memo_line", "RECEIPT OF FEES - Civil issue money") + .stringType("natural_account_code", "4481102133") + .object("percentage_amount", percentageAmount -> percentageAmount + .numberType("percentage", 5)) + .stringType("si_ref_id", "1.1h") + .stringType("status", "approved") + .stringType("statutory_instrument", "2014 No 874") + .stringMatcher("valid_from", + "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}\\+\\d{2}:\\d{2})$", + "2015-03-09T00:00:00.000+00:00") + .stringMatcher("valid_to", + "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}\\+\\d{2}:\\d{2})$", + "2022-03-09T00:00:00.000+00:00") + .numberType("version", 2); } } diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/LocationReferenceDataApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/LocationReferenceDataApiConsumerTest.java index 0dd5c5a9cc5..f3d9653fc66 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/LocationReferenceDataApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/LocationReferenceDataApiConsumerTest.java @@ -33,37 +33,37 @@ public class LocationReferenceDataApiConsumerTest extends BaseContractTest { @Autowired private LocationReferenceDataApiClient locationReferenceDataApiClient; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getCourtVenueByName(PactDslWithProvider builder) throws JSONException, IOException { return buildCourtVenueByNameResponsePact(builder); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getCourtVenueByEpimmsId(PactDslWithProvider builder) throws JSONException, IOException { return buildCourtVenueByEpimmsIdResponsePact(builder); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getCourtVenueByEpimmsIdAndType(PactDslWithProvider builder) throws JSONException, IOException { return buildCourtVenueByEpimmsIdAndTypeResponsePact(builder); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getCourtVenueByLocationCode(PactDslWithProvider builder) throws JSONException, IOException { return buildCourtVenueByLocationCodeResponsePact(builder); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getHearingVenue(PactDslWithProvider builder) throws JSONException, IOException { return buildHearingVenueResponsePact(builder); } - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact getCourtVenue(PactDslWithProvider builder) throws JSONException, IOException { return buildCourtVenueResponsePact(builder); @@ -284,7 +284,4 @@ static DslPart buildLocationRefDataResponseBody() { ).build(); } - private String createJsonObject(Object obj) throws JSONException, IOException { - return objectMapper.writeValueAsString(obj); - } } diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/NewBundleApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/NewBundleApiConsumerTest.java index 28c84e13409..6e34c458a77 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/NewBundleApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/NewBundleApiConsumerTest.java @@ -46,7 +46,7 @@ public class NewBundleApiConsumerTest extends BaseContractTest { @Autowired private EvidenceManagementApiClient evidenceManagementApiClient; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact postCreateBundleServiceRequest(PactDslWithProvider builder) throws JSONException, IOException { return buildCreateBundleResponsePact(builder); @@ -227,7 +227,4 @@ static DslPart buildBundleCreateResponseDsl() { ).build(); } - private String createJsonObject(Object obj) throws JSONException, IOException { - return objectMapper.writeValueAsString(obj); - } } diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/PaymentsApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/PaymentsApiConsumerTest.java index 67ca382c475..74329480e04 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/PaymentsApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/PaymentsApiConsumerTest.java @@ -8,132 +8,131 @@ import au.com.dius.pact.core.model.annotations.Pact; import org.apache.http.HttpStatus; import org.json.JSONException; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.test.context.TestPropertySource; -import uk.gov.hmcts.reform.payments.client.PaymentsApi; +import uk.gov.hmcts.reform.authorisation.generators.AuthTokenGenerator; +import uk.gov.hmcts.reform.civil.config.PaymentsConfiguration; +import uk.gov.hmcts.reform.civil.model.CaseData; +import uk.gov.hmcts.reform.civil.prd.model.ContactInformation; +import uk.gov.hmcts.reform.civil.prd.model.Organisation; +import uk.gov.hmcts.reform.civil.sampledata.CaseDataBuilder; +import uk.gov.hmcts.reform.civil.service.OrganisationService; +import uk.gov.hmcts.reform.civil.service.PaymentsService; import uk.gov.hmcts.reform.payments.client.models.PaymentDto; -import uk.gov.hmcts.reform.payments.request.CardPaymentServiceRequestDTO; -import uk.gov.hmcts.reform.payments.response.CardPaymentServiceRequestResponse; import java.io.IOException; -import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; import static au.com.dius.pact.consumer.dsl.LambdaDsl.newJsonBody; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; -@PactTestFor(providerName = "payment_api") +@PactTestFor(providerName = "payment_creditAccountPayment") @MockServerConfig(hostInterface = "localhost", port = "6670") @TestPropertySource(properties = "payments.api.url=http://localhost:6670") public class PaymentsApiConsumerTest extends BaseContractTest { - public static final String PAYMENT_REQUEST_ENDPOINT_PREFIX = "/service-request/"; - public static final String PAYMENT_REQUEST_ENDPOINT_SUFFIX = "/card-payments"; - private static final String SERVICE_REQUEST_ID_SUFFIX = "${service-request-reference}"; - - public static final String STATUS_ENDPOINT_PREFIX = "/card-payments/"; - public static final String STATUS_ENDPOINT_SUFFIX = "/statuses"; - private static final String PAYMENT_REFERENCE_ID_SUFFIX = "${paymentReference}"; - private static final String REFERENCE = "123456789"; + private static final String SERVICE = "CIVIL"; + private static final String SITE_ID = "site_id"; + private static final String SPEC_SITE_ID = "spec_site_id"; + private static final Organisation ORGANISATION = Organisation.builder() + .name("test org") + .contactInformation(List.of(ContactInformation.builder().build())) + .build(); + protected static final String ACCOUNT_NUMBER = "PBA0077597"; @Autowired - private PaymentsApi paymentsApi; + private PaymentsService paymentsService; - @Pact(consumer = "civil-service") - public RequestResponsePact getStatusOfPayment(PactDslWithProvider builder) - throws JSONException, IOException { - return buildStatusOfPaymentPact(builder); - } + @MockBean + AuthTokenGenerator authTokenGenerator; - @Test - @PactTestFor(pactMethod = "getStatusOfPayment") - public void verifyPaymentSuccess() { - PaymentDto response = paymentsApi.retrieveCardPaymentStatus(REFERENCE, AUTHORIZATION_TOKEN, SERVICE_AUTH_TOKEN); - assertThat(response.getStatus(), is("Success")); - } + @MockBean + private OrganisationService organisationService; - public RequestResponsePact buildStatusOfPaymentPact(PactDslWithProvider builder) throws IOException { - return builder - .given("The status of a payment request needs to be checked") - .uponReceiving("a request for status for a payment reference") - .pathFromProviderState( - STATUS_ENDPOINT_PREFIX + PAYMENT_REFERENCE_ID_SUFFIX + STATUS_ENDPOINT_SUFFIX, - STATUS_ENDPOINT_PREFIX + REFERENCE + STATUS_ENDPOINT_SUFFIX - ) - .headers(AUTHORIZATION_HEADER, AUTHORIZATION_TOKEN, SERVICE_AUTHORIZATION_HEADER, SERVICE_AUTH_TOKEN) - .method(HttpMethod.GET.toString()) - .willRespondWith() - .matchHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) - .body(buildPaymentStatusResponseDsl()) - .status(HttpStatus.SC_OK) - .toPact(); - } + @MockBean + private PaymentsConfiguration paymentsConfiguration; - public static DslPart buildPaymentStatusResponseDsl() { - return newJsonBody(response -> - response - .stringValue("external_reference", "DUMMY-EXT-REF") - .stringValue("payment_reference", "DUMMY-PAYMENT-REF") - .stringValue("status", "Success") - .stringValue("date_created", "2020-02-20T20:20:20.222+0000") - ).build(); - } + private CaseData caseData = CaseDataBuilder.builder().buildClaimIssuedPaymentCaseDataWithPba(ACCOUNT_NUMBER); - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact doCardPaymentRequest(PactDslWithProvider builder) throws JSONException, IOException { return buildCardPaymentRequestPact(builder); } + @BeforeEach + void setUp() { + when(paymentsConfiguration.getService()).thenReturn(SERVICE); + when(paymentsConfiguration.getSiteId()).thenReturn(SITE_ID); + when(paymentsConfiguration.getSpecSiteId()).thenReturn(SPEC_SITE_ID); + when(organisationService.findOrganisationById(any())).thenReturn(Optional.of(ORGANISATION)); + when(authTokenGenerator.generate()).thenReturn(SERVICE_AUTH_TOKEN); + } + @Test @PactTestFor(pactMethod = "doCardPaymentRequest") - public void verifyPostOfPaymentRequest() { - CardPaymentServiceRequestResponse response = paymentsApi.createGovPayCardPaymentRequest(REFERENCE, AUTHORIZATION_TOKEN, SERVICE_AUTH_TOKEN, buildPaymentRequest()); - assertThat(response.getExternalReference(), is("DUMMY-EXT-REF")); - assertThat(response.getStatus(), is("Initiated")); - assertThat(response.getNextUrl(), is("cui-page.hmcts.platform.net")); + public void verifyCreditCardPaymentRequest() { + PaymentDto response = paymentsService.createCreditAccountPayment(caseData, AUTHORIZATION_TOKEN); + assertThat(response.getStatus(), is("Success")); + } private RequestResponsePact buildCardPaymentRequestPact(PactDslWithProvider builder) throws IOException { + + Map paymentMap = new HashMap<>(); + paymentMap.put("accountNumber", ACCOUNT_NUMBER); + paymentMap.put("availableBalance", "1000.00"); + paymentMap.put("accountName", "test.account.name"); + return builder - .given("Post a payment request to pay service request") - .uponReceiving("a request payment") - .pathFromProviderState( - PAYMENT_REQUEST_ENDPOINT_PREFIX + SERVICE_REQUEST_ID_SUFFIX + PAYMENT_REQUEST_ENDPOINT_SUFFIX, - PAYMENT_REQUEST_ENDPOINT_PREFIX + REFERENCE + PAYMENT_REQUEST_ENDPOINT_SUFFIX - ) - .headers(AUTHORIZATION_HEADER, AUTHORIZATION_TOKEN, SERVICE_AUTHORIZATION_HEADER, SERVICE_AUTH_TOKEN) + .given("An active account has sufficient funds for a payment", paymentMap) + .uponReceiving("a request to create a payment in payments api with valid authorization") + .path("/credit-account-payments") + .headers(AUTHORIZATION_HEADER, AUTHORIZATION_TOKEN) .method(HttpMethod.POST.toString()) + .body(createJsonObject(paymentsService.buildRequest(caseData))) .willRespondWith() .matchHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) - .body(buildDoPaymentResponseDsl()) - .status(HttpStatus.SC_OK) + .body(buildPBAPaymentResponseDsl("Success", "success", null, "Payment by account successful")) + .status(HttpStatus.SC_CREATED) .toPact(); } - public CardPaymentServiceRequestDTO buildPaymentRequest() { - return CardPaymentServiceRequestDTO.builder() - .language("En") - .currency("GBP") - .amount(new BigDecimal(5000)) - .returnUrl("cui-page.hmcts.platform.net") - .build(); - + private DslPart buildPBAPaymentResponseDsl(String status, String paymentStatus, String errorCode, String errorMessage) { + return getDslPart(status, paymentStatus, errorCode, errorMessage); } - public static DslPart buildDoPaymentResponseDsl() { - return newJsonBody(response -> - response - .stringValue("external_reference", "DUMMY-EXT-REF") - .stringValue("payment_reference", "DUMMY-PAYMENT-REF") - .stringValue("status", "Initiated") - .stringValue("next_url", "cui-page.hmcts.platform.net") - .stringValue("date_created", "2020-02-20T20:20:20.222+0000") - ).build(); + static DslPart getDslPart(String status, String paymentStatus, String errorCode, String errorMessage) { + return newJsonBody((o) -> { + o.stringType("reference", "reference") + .stringType("status", status) + .minArrayLike("status_histories", 1, 1, + (sh) -> { + sh.stringMatcher("date_updated", + "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}\\+\\d{4})$", + "2020-10-06T18:54:48.785+0000") + .stringMatcher("date_created", + "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}\\+\\d{4})$", + "2020-10-06T18:54:48.785+0000") + .stringValue("status", paymentStatus); + if (errorCode != null) { + sh.stringValue("error_code", errorCode); + sh.stringType("error_message", + errorMessage); + } + }); + }).build(); } - } diff --git a/src/contractTest/java/uk/gov/hmcts/reform/civil/StitchBundleApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/civil/StitchBundleApiConsumerTest.java index daeffc2eaab..23f7e237836 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/civil/StitchBundleApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/civil/StitchBundleApiConsumerTest.java @@ -36,7 +36,7 @@ public class StitchBundleApiConsumerTest extends BaseContractTest { @Autowired private EvidenceManagementApiClient evidenceManagementApiClient; - @Pact(consumer = "civil-service") + @Pact(consumer = "civil_service") public RequestResponsePact postStitchBundleServiceRequest(PactDslWithProvider builder) throws JSONException, IOException { return buildStitchBundleResponsePact(builder); @@ -116,8 +116,4 @@ private BundleRequest getBundleRequest() { .build()) .build(); } - - private String createJsonObject(Object obj) throws JSONException, IOException { - return objectMapper.writeValueAsString(obj); - } } diff --git a/src/main/java/uk/gov/hmcts/reform/civil/model/FeeVersionDto.java b/src/main/java/uk/gov/hmcts/reform/civil/model/FeeVersionDto.java index 6e3e8816d4a..91cb6e6dc50 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/model/FeeVersionDto.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/model/FeeVersionDto.java @@ -1,6 +1,7 @@ package uk.gov.hmcts.reform.civil.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.AllArgsConstructor; @@ -23,6 +24,7 @@ public class FeeVersionDto { public static final String STATUS_PENDING = "pending_approval"; public static final String STATUS_DISCONTINUED = "discontinued"; + @JsonProperty("approvedBy") private String approvedBy; private String author; private String description; diff --git a/src/main/java/uk/gov/hmcts/reform/civil/service/PaymentsService.java b/src/main/java/uk/gov/hmcts/reform/civil/service/PaymentsService.java index fdd9f08ccc9..031d5909308 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/service/PaymentsService.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/service/PaymentsService.java @@ -35,6 +35,7 @@ public class PaymentsService { private static final String PAYMENT_ACTION = "Case Submit"; + protected static final String CLAIM_ISSUE_PAYMENT = "Claim issue payment"; private final PaymentsClient paymentsClient; private final PaymentsConfiguration paymentsConfiguration; private final OrganisationService organisationService; @@ -50,7 +51,7 @@ public PaymentDto createCreditAccountPayment(CaseData caseData, String authToken return paymentsClient.createCreditAccountPayment(authToken, buildRequest(caseData)); } - private CreditAccountPaymentRequest buildRequest(CaseData caseData) { + public CreditAccountPaymentRequest buildRequest(CaseData caseData) { FeeDto claimFee = caseData.getClaimFee().toFeeDto(); var organisationId = caseData.getApplicant1OrganisationPolicy().getOrganisation().getOrganisationID(); var organisationName = organisationService.findOrganisationById(organisationId) @@ -60,35 +61,26 @@ private CreditAccountPaymentRequest buildRequest(CaseData caseData) { String customerReference = ofNullable(caseData.getClaimIssuedPaymentDetails()) .map(PaymentDetails::getCustomerReference) .orElse(caseData.getPaymentReference()); - CreditAccountPaymentRequest creditAccountPaymentRequest = null; - if (!SPEC_CLAIM.equals(caseData.getCaseAccessCategory())) { - creditAccountPaymentRequest = CreditAccountPaymentRequest.builder() - .accountNumber(caseData.getApplicantSolicitor1PbaAccounts().getValue().getLabel()) - .amount(claimFee.getCalculatedAmount()) - .caseReference(caseData.getLegacyCaseReference()) - .ccdCaseNumber(caseData.getCcdCaseReference().toString()) - .customerReference(customerReference) - .description("Claim issue payment") - .organisationName(organisationName) - .service(paymentsConfiguration.getService()) - .siteId(paymentsConfiguration.getSiteId()) - .fees(new FeeDto[]{claimFee}) - .build(); - } else if (SPEC_CLAIM.equals(caseData.getCaseAccessCategory())) { - creditAccountPaymentRequest = CreditAccountPaymentRequest.builder() - .accountNumber(caseData.getApplicantSolicitor1PbaAccounts().getValue().getLabel()) - .amount(claimFee.getCalculatedAmount()) - .caseReference(caseData.getLegacyCaseReference()) - .ccdCaseNumber(caseData.getCcdCaseReference().toString()) - .customerReference(customerReference) - .description("Claim issue payment") - .organisationName(organisationName) - .service(paymentsConfiguration.getSpecService()) - .siteId(paymentsConfiguration.getSpecSiteId()) - .fees(new FeeDto[]{claimFee}) - .build(); - } + return getCreditAccountPaymentRequest(caseData, claimFee, customerReference, organisationName); + } + + private CreditAccountPaymentRequest getCreditAccountPaymentRequest(CaseData caseData, FeeDto claimFee, String customerReference, + String organisationName) { + CreditAccountPaymentRequest creditAccountPaymentRequest; + creditAccountPaymentRequest = CreditAccountPaymentRequest.builder() + .accountNumber(caseData.getApplicantSolicitor1PbaAccounts().getValue().getLabel()) + .amount(claimFee.getCalculatedAmount()) + .caseReference(caseData.getLegacyCaseReference()) + .ccdCaseNumber(caseData.getCcdCaseReference().toString()) + .customerReference(customerReference) + .description(CLAIM_ISSUE_PAYMENT) + .organisationName(organisationName) + .service( + SPEC_CLAIM.equals(caseData.getCaseAccessCategory()) ? paymentsConfiguration.getSpecService() : paymentsConfiguration.getService()) + .siteId(SPEC_CLAIM.equals(caseData.getCaseAccessCategory()) ? paymentsConfiguration.getSpecSiteId() : paymentsConfiguration.getSiteId()) + .fees(new FeeDto[] {claimFee}) + .build(); return creditAccountPaymentRequest; } @@ -129,7 +121,7 @@ private PBAServiceRequestDTO buildPbaPaymentRequestBulkClaim(CaseData caseData) if (serviceRequestPBADetails != null) { pbaServiceRequestDTO = PBAServiceRequestDTO.builder() .accountNumber(serviceRequestPBADetails.getApplicantsPbaAccounts() - .getValue().getLabel()) + .getValue().getLabel()) .amount(srFee.getCalculatedAmount()) .customerReference("bulk claim issuer") .organisationName(organisationName) @@ -193,14 +185,14 @@ private CreateServiceRequestDTO buildServiceRequest(CaseData caseData) { .ccdCaseNumber(caseData.getCcdCaseReference().toString()) .hmctsOrgId(siteId) .callBackUrl(callbackURLUsed) - .fees(new FeeDto[]{(FeeDto.builder() + .fees(new FeeDto[] {(FeeDto.builder() .calculatedAmount(feeResponse.getCalculatedAmount()) .code(feeResponse.getCode()) .version(feeResponse.getVersion()) .volume(1).build())}) .casePaymentRequest(CasePaymentRequestDto.builder() - .action(PAYMENT_ACTION) - .responsibleParty(caseData.getApplicant1().getPartyName()).build()) + .action(PAYMENT_ACTION) + .responsibleParty(caseData.getApplicant1().getPartyName()).build()) .build(); } else { diff --git a/src/test/java/uk/gov/hmcts/reform/civil/sampledata/CaseDataBuilder.java b/src/test/java/uk/gov/hmcts/reform/civil/sampledata/CaseDataBuilder.java index 165aeff9351..7064d319b95 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/sampledata/CaseDataBuilder.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/sampledata/CaseDataBuilder.java @@ -238,78 +238,78 @@ public class CaseDataBuilder { final String reason = """ - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - felis, ultricies nec, pellentesque eu, pretium quis, sem. - venenatis vitae, justo. Nullam dictum felis eu pede molli - consequat vitae, eleifend ac, enim. Aliquam lorem ante, d - nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam - quam nunc, blandit vel, luctus pulvinar, hendrerit id, lo - faucibus tincidunt. Duis leo. Sed fringilla mauris sit am - vulputate eleifend sapien. Vestibulum purus quam, sceleri - primis in faucibus orci luctus et ultrices posuere cubili - ipsum. Sed aliquam ultrices mauris. Integer ante arcu, ac - volutpat pretium libero. Cras id dui. Aenean ut eros et n - Phasellus nec sem in justo pellentesque facilisis. Etiam\s - non, euismod vitae, posuere imperdiet, leo. Maecenas male - ante ipsum primis in faucibus orci luctus et ultrices pos - vestibulum elit. Aenean tellus metus, bibendum sed, posue - cursus feugiat, nunc augue blandit nunc, eu sollicitudin\s - venenatis condimentum, sem libero volutpat nibh, nec pell - tincidunt libero. Phasellus dolor. Maecenas vestibulum mo - posuere eget, vestibulum et, tempor auctor, justo. In ac\s - rhoncus pede. Pellentesque habitant morbi tristique senec - In hac habitasse platea dictumst. Curabitur at lacus ac v - sem. Pellentesque libero tortor, tincidunt et, tincidunt\s - leo quis pede. Donec interdum, metus et hendrerit aliquet - venenatis vulputate lorem. Morbi nec metus. Phasellus bla - fermentum eu, tincidunt eu, varius ut, felis. In auctor l - Nullam cursus lacinia erat. Praesent blandit laoreet nibh - orci leo non est. Quisque id mi. Ut tincidunt tincidunt e - habitasse platea dictumst. Fusce a quam. Etiam ut purus m - Sed augue ipsum, egestas nec, vestibulum et, malesuada ad - fermentum libero. Praesent nonummy mi in odio. Nunc inter - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - felis, ultricies nec, pellentesque eu, pretium quis, sem. - venenatis vitae, justo. Nullam dictum felis eu pede molli - consequat vitae, eleifend ac, enim. Aliquam lorem ante, d - nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam - quam nunc, blandit vel, luctus pulvinar, hendrerit id, lo - faucibus tincidunt. Duis leo. Sed fringilla mauris sit am - vulputate eleifend sapien. Vestibulum purus quam, sceleri - primis in faucibus orci luctus et ultrices posuere cubili - ipsum. Sed aliquam ultrices mauris. Integer ante arcu, ac - volutpat pretium libero. Cras id dui. Aenean ut eros et n - Phasellus nec sem in justo pellentesque facilisis. Etiam\s - non, euismod vitae, posuere imperdiet, leo. Maecenas male - ante ipsum primis in faucibus orci luctus et ultrices pos - vestibulum elit. Aenean tellus metus, bibendum sed, posue - cursus feugiat, nunc augue blandit nunc, eu sollicitudin\s - venenatis condimentum, sem libero volutpat nibh, nec pell - tincidunt libero. Phasellus dolor. Maecenas vestibulum mo - posuere eget, vestibulum et, tempor auctor, justo. In ac\s - rhoncus pede. Pellentesque habitant morbi tristique senec - In hac habitasse platea dictumst. Curabitur at lacus ac v - sem. Pellentesque libero tortor, tincidunt et, tincidunt\s - leo quis pede. Donec interdum, metus et hendrerit aliquet - venenatis vulputate lorem. Morbi nec metus. Phasellus bla - fermentum eu, tincidunt eu, varius ut, felis. In auctor l - Nullam cursus lacinia erat. Praesent blandit laoreet nibh - orci leo non est. Quisque id mi. Ut tincidunt tincidunt e - habitasse platea dictumst. Fusce a quam. Etiam ut purus m - Sed augue ipsum, egestas nec, vestibulum et, malesuada ad - fermentum libero. Praesent nonummy mi in odio. Nunc inter - fermentum eu, tincidunt eu, varius ut, felis. In auctor l - Nullam cursus lacinia erat. Praesent blandit laoreet nibh - orci leo non est. Quisque id mi. Ut tincidunt tincidunt e - habitasse platea dictumst. Fusce a quam. Etiam ut purus m - Sed augue ipsum, egestas nec, vestibulum et, malesuada ad - fermentum libero. Praesent nonummy mi in odio. Nunc inter - fermentum libero. Praesent nonummy mi in odio. Nunc inter - Sed augue ipsum, egestas nec, vestibulum et, malesuada ad - fermentum libero. Praesent nonummy mi in odio. Nunc inter - fermentum libero. Praesent nonummy mi in odio. Nunc inter - fermentum libero.Praesent nonummy mi in odio au. - """; + Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + felis, ultricies nec, pellentesque eu, pretium quis, sem. + venenatis vitae, justo. Nullam dictum felis eu pede molli + consequat vitae, eleifend ac, enim. Aliquam lorem ante, d + nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam + quam nunc, blandit vel, luctus pulvinar, hendrerit id, lo + faucibus tincidunt. Duis leo. Sed fringilla mauris sit am + vulputate eleifend sapien. Vestibulum purus quam, sceleri + primis in faucibus orci luctus et ultrices posuere cubili + ipsum. Sed aliquam ultrices mauris. Integer ante arcu, ac + volutpat pretium libero. Cras id dui. Aenean ut eros et n + Phasellus nec sem in justo pellentesque facilisis. Etiam\s + non, euismod vitae, posuere imperdiet, leo. Maecenas male + ante ipsum primis in faucibus orci luctus et ultrices pos + vestibulum elit. Aenean tellus metus, bibendum sed, posue + cursus feugiat, nunc augue blandit nunc, eu sollicitudin\s + venenatis condimentum, sem libero volutpat nibh, nec pell + tincidunt libero. Phasellus dolor. Maecenas vestibulum mo + posuere eget, vestibulum et, tempor auctor, justo. In ac\s + rhoncus pede. Pellentesque habitant morbi tristique senec + In hac habitasse platea dictumst. Curabitur at lacus ac v + sem. Pellentesque libero tortor, tincidunt et, tincidunt\s + leo quis pede. Donec interdum, metus et hendrerit aliquet + venenatis vulputate lorem. Morbi nec metus. Phasellus bla + fermentum eu, tincidunt eu, varius ut, felis. In auctor l + Nullam cursus lacinia erat. Praesent blandit laoreet nibh + orci leo non est. Quisque id mi. Ut tincidunt tincidunt e + habitasse platea dictumst. Fusce a quam. Etiam ut purus m + Sed augue ipsum, egestas nec, vestibulum et, malesuada ad + fermentum libero. Praesent nonummy mi in odio. Nunc inter + Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + felis, ultricies nec, pellentesque eu, pretium quis, sem. + venenatis vitae, justo. Nullam dictum felis eu pede molli + consequat vitae, eleifend ac, enim. Aliquam lorem ante, d + nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam + quam nunc, blandit vel, luctus pulvinar, hendrerit id, lo + faucibus tincidunt. Duis leo. Sed fringilla mauris sit am + vulputate eleifend sapien. Vestibulum purus quam, sceleri + primis in faucibus orci luctus et ultrices posuere cubili + ipsum. Sed aliquam ultrices mauris. Integer ante arcu, ac + volutpat pretium libero. Cras id dui. Aenean ut eros et n + Phasellus nec sem in justo pellentesque facilisis. Etiam\s + non, euismod vitae, posuere imperdiet, leo. Maecenas male + ante ipsum primis in faucibus orci luctus et ultrices pos + vestibulum elit. Aenean tellus metus, bibendum sed, posue + cursus feugiat, nunc augue blandit nunc, eu sollicitudin\s + venenatis condimentum, sem libero volutpat nibh, nec pell + tincidunt libero. Phasellus dolor. Maecenas vestibulum mo + posuere eget, vestibulum et, tempor auctor, justo. In ac\s + rhoncus pede. Pellentesque habitant morbi tristique senec + In hac habitasse platea dictumst. Curabitur at lacus ac v + sem. Pellentesque libero tortor, tincidunt et, tincidunt\s + leo quis pede. Donec interdum, metus et hendrerit aliquet + venenatis vulputate lorem. Morbi nec metus. Phasellus bla + fermentum eu, tincidunt eu, varius ut, felis. In auctor l + Nullam cursus lacinia erat. Praesent blandit laoreet nibh + orci leo non est. Quisque id mi. Ut tincidunt tincidunt e + habitasse platea dictumst. Fusce a quam. Etiam ut purus m + Sed augue ipsum, egestas nec, vestibulum et, malesuada ad + fermentum libero. Praesent nonummy mi in odio. Nunc inter + fermentum eu, tincidunt eu, varius ut, felis. In auctor l + Nullam cursus lacinia erat. Praesent blandit laoreet nibh + orci leo non est. Quisque id mi. Ut tincidunt tincidunt e + habitasse platea dictumst. Fusce a quam. Etiam ut purus m + Sed augue ipsum, egestas nec, vestibulum et, malesuada ad + fermentum libero. Praesent nonummy mi in odio. Nunc inter + fermentum libero. Praesent nonummy mi in odio. Nunc inter + Sed augue ipsum, egestas nec, vestibulum et, malesuada ad + fermentum libero. Praesent nonummy mi in odio. Nunc inter + fermentum libero. Praesent nonummy mi in odio. Nunc inter + fermentum libero.Praesent nonummy mi in odio au. + """; public static final String LEGACY_CASE_REFERENCE = "000DC001"; public static final Long CASE_ID = 1594901956117591L; @@ -662,8 +662,8 @@ public class CaseDataBuilder { private DecisionOnRequestReconsiderationOptions decisionOnRequestReconsiderationOptions; private UpholdingPreviousOrderReason upholdingPreviousOrderReason; - private HelpWithFeesMoreInformation helpWithFeesMoreInformationClaimIssue; - private HelpWithFeesMoreInformation helpWithFeesMoreInformationHearing; + private HelpWithFeesMoreInformation helpWithFeesMoreInformationClaimIssue; + private HelpWithFeesMoreInformation helpWithFeesMoreInformationHearing; private FeePaymentOutcomeDetails feePaymentOutcomeDetails; @@ -918,64 +918,64 @@ public CaseDataBuilder cosNotifyClaimDefendant2(CertificateOfService cosNotifyCl public CaseDataBuilder respondent1DQWithFixedRecoverableCosts() { respondent1DQ = respondent1DQ.toBuilder() .respondent1DQFixedRecoverableCosts(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .build()).build(); return this; } public CaseDataBuilder respondent1DQWithFixedRecoverableCostsIntermediate(Document document) { respondent1DQ = respondent1DQ.toBuilder() .respondent1DQFixedRecoverableCostsIntermediate(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .frcSupportingDocument(document) - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .frcSupportingDocument(document) + .build()).build(); return this; } public CaseDataBuilder respondent1DQWithFixedRecoverableCostsIntermediate() { respondent1DQ = respondent1DQ.toBuilder() .respondent1DQFixedRecoverableCostsIntermediate(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .frcSupportingDocument( - DocumentBuilder.builder() - .documentName("frc-doc1").build()) - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .frcSupportingDocument( + DocumentBuilder.builder() + .documentName("frc-doc1").build()) + .build()).build(); return this; } public CaseDataBuilder respondent1DQ() { respondent1DQ = Respondent1DQ.builder() .respondent1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent1DQExperts(Experts.builder().expertRequired(NO).build()) .respondent1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent1DQHearingSupport(HearingSupport.builder() - .supportRequirements(YES) - .supportRequirementsAdditional("Additional support needed") - .requirements(List.of()).build()) + .supportRequirements(YES) + .supportRequirementsAdditional("Additional support needed") + .requirements(List.of()).build()) .respondent1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent1DQLanguage(WelshLanguageRequirements.builder().build()) .respondent1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent1DQStatementOfTruth(StatementOfTruth.builder().name("John Doe").role("Solicitor").build()) .respondent1DQDraftDirections(DocumentBuilder.builder().documentName("defendant1-directions.pdf").build()) .build(); @@ -990,23 +990,23 @@ public CaseDataBuilder respondent1DQ(Respondent1DQ respondent1DQ) { public CaseDataBuilder respondent1DQWithoutSotAndExperts() { respondent1DQ = Respondent1DQ.builder() .respondent1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent1DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent1DQLanguage(WelshLanguageRequirements.builder().build()) .respondent1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent1DQDraftDirections(DocumentBuilder.builder().documentName("defendant1-directions.pdf").build()) .build(); return this; @@ -1015,31 +1015,31 @@ public CaseDataBuilder respondent1DQWithoutSotAndExperts() { public CaseDataBuilder respondent1DQWithLocation() { respondent1DQ = Respondent1DQ.builder() .respondent1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent1DQExperts(Experts.builder().expertRequired(NO).build()) .respondent1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent1DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("444") - .responseCourtName("Court name 444") - .reasonForHearingAtSpecificCourt("Reason of Respondent 1 to choose court") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("444") + .responseCourtName("Court name 444") + .reasonForHearingAtSpecificCourt("Reason of Respondent 1 to choose court") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .respondent1DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent1DQLanguage(WelshLanguageRequirements.builder().build()) .respondent1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent1DQStatementOfTruth(StatementOfTruth.builder().name("John Doe").role("Solicitor").build()) .respondent1DQDraftDirections(DocumentBuilder.builder().documentName("defendant1-directions.pdf").build()) .build(); @@ -1049,28 +1049,28 @@ public CaseDataBuilder respondent1DQWithLocation() { public CaseDataBuilder respondent1DQWithLocationAndWithoutExperts() { respondent1DQ = Respondent1DQ.builder() .respondent1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent1DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("444") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("444") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .respondent1DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent1DQLanguage(WelshLanguageRequirements.builder().build()) .respondent1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent1DQStatementOfTruth(StatementOfTruth.builder().name("John Doe").role("Solicitor").build()) .respondent1DQDraftDirections(DocumentBuilder.builder().documentName("defendant1-directions.pdf").build()) .build(); @@ -1084,7 +1084,7 @@ public CaseDataBuilder respondent1DQWithUnavailableDates() { .build(); this.respondent1DQ = Respondent1DQ.builder() .respondent1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(YES) - .unavailableDates(wrapElements(List.of(unavailableDate))).build()) + .unavailableDates(wrapElements(List.of(unavailableDate))).build()) .build(); return this; } @@ -1097,7 +1097,7 @@ public CaseDataBuilder respondent1DQWithUnavailableDateRange() { .build(); this.respondent1DQ = Respondent1DQ.builder() .respondent1DQHearing(Hearing.builder().hearingLength(MORE_THAN_DAY).unavailableDatesRequired(YES) - .unavailableDates(wrapElements(List.of(unavailableDate))).build()) + .unavailableDates(wrapElements(List.of(unavailableDate))).build()) .build(); return this; } @@ -1110,7 +1110,7 @@ public CaseDataBuilder respondent2DQWithUnavailableDateRange() { .build(); this.respondent2DQ = Respondent2DQ.builder() .respondent2DQHearing(Hearing.builder().hearingLength(MORE_THAN_DAY).unavailableDatesRequired(YES) - .unavailableDates(wrapElements(List.of(unavailableDate))).build()) + .unavailableDates(wrapElements(List.of(unavailableDate))).build()) .build(); return this; } @@ -1123,7 +1123,7 @@ public CaseDataBuilder applicant1DQWithUnavailableDateRange() { .build(); this.applicant1DQ = Applicant1DQ.builder() .applicant1DQHearing(Hearing.builder().hearingLength(MORE_THAN_DAY).unavailableDatesRequired(YES) - .unavailableDates(wrapElements(List.of(unavailableDate))).build()) + .unavailableDates(wrapElements(List.of(unavailableDate))).build()) .build(); return this; } @@ -1135,7 +1135,7 @@ public CaseDataBuilder applicant1DQWithUnavailableDate() { .build(); this.applicant1DQ = Applicant1DQ.builder() .applicant1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(YES) - .unavailableDates(wrapElements(List.of(unavailableDate))).build()) + .unavailableDates(wrapElements(List.of(unavailableDate))).build()) .build(); return this; } @@ -1143,31 +1143,31 @@ public CaseDataBuilder applicant1DQWithUnavailableDate() { public CaseDataBuilder respondent2DQWithLocation() { respondent2DQ = Respondent2DQ.builder() .respondent2DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent2DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent2DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent2DQExperts(Experts.builder().expertRequired(NO).build()) .respondent2DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent2DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent2DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("444") - .responseCourtName("Court name 444") - .reasonForHearingAtSpecificCourt("Reason of Respondent 2 to choose court") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("444") + .responseCourtName("Court name 444") + .reasonForHearingAtSpecificCourt("Reason of Respondent 2 to choose court") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .respondent2DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent2DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent2DQLanguage(WelshLanguageRequirements.builder().build()) .respondent2DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent2DQStatementOfTruth(StatementOfTruth.builder().name("John Doe").role("Solicitor").build()) .respondent2DQDraftDirections(DocumentBuilder.builder().documentName("defendant1-directions.pdf").build()) .build(); @@ -1177,28 +1177,28 @@ public CaseDataBuilder respondent2DQWithLocation() { public CaseDataBuilder respondent2DQWithLocationAndWithoutExperts() { respondent2DQ = Respondent2DQ.builder() .respondent2DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent2DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent2DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent2DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent2DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent2DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("444") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("444") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .respondent2DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent2DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent2DQLanguage(WelshLanguageRequirements.builder().build()) .respondent2DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent2DQStatementOfTruth(StatementOfTruth.builder().name("John Doe").role("Solicitor").build()) .respondent2DQDraftDirections(DocumentBuilder.builder().documentName("defendant1-directions.pdf").build()) .build(); @@ -1208,41 +1208,41 @@ public CaseDataBuilder respondent2DQWithLocationAndWithoutExperts() { public CaseDataBuilder respondent2DQWithFixedRecoverableCosts() { respondent2DQ = respondent2DQ.toBuilder() .respondent2DQFixedRecoverableCosts(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .build()).build(); return this; } public CaseDataBuilder respondent2DQWithFixedRecoverableCostsIntermediate() { respondent2DQ = respondent2DQ.toBuilder() .respondent2DQFixedRecoverableCostsIntermediate(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .frcSupportingDocument( - DocumentBuilder.builder() - .documentName("frc-doc1").build()) - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .frcSupportingDocument( + DocumentBuilder.builder() + .documentName("frc-doc1").build()) + .build()).build(); return this; } public CaseDataBuilder respondent2DQ() { respondent2DQ = Respondent2DQ.builder() .respondent2DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent2DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent2DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent2DQExperts(Experts.builder().expertRequired(NO).build()) .respondent2DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent2DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) @@ -1250,7 +1250,7 @@ public CaseDataBuilder respondent2DQ() { .respondent2DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent2DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent2DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent2DQLanguage(WelshLanguageRequirements.builder().build()) .respondent2DQStatementOfTruth(StatementOfTruth.builder().name("Jane Doe").role("Solicitor").build()) .respondent2DQDraftDirections(DocumentBuilder.builder().documentName("defendant2-directions.pdf").build()) @@ -1266,23 +1266,23 @@ public CaseDataBuilder respondent2DQ(Respondent2DQ respondent2DQ) { public CaseDataBuilder respondent2DQWithoutSotAndExperts() { respondent2DQ = Respondent2DQ.builder() .respondent2DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("CONFIRM")) - .oneMonthStayRequested(YES) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("CONFIRM")) + .oneMonthStayRequested(YES) + .reactionProtocolCompliedWith(YES) + .build()) .respondent2DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .respondent2DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .respondent2DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .respondent2DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .respondent2DQRequestedCourt(RequestedCourt.builder().build()) .respondent2DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .respondent2DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .respondent2DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .respondent2DQLanguage(WelshLanguageRequirements.builder().build()) .respondent2DQDraftDirections(DocumentBuilder.builder().documentName("defendant2-directions.pdf").build()) .build(); @@ -1292,28 +1292,28 @@ public CaseDataBuilder respondent2DQWithoutSotAndExperts() { public CaseDataBuilder applicant1DQ() { applicant1DQ = Applicant1DQ.builder() .applicant1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("OTHER")) - .oneMonthStayRequested(NO) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("OTHER")) + .oneMonthStayRequested(NO) + .reactionProtocolCompliedWith(YES) + .build()) .applicant1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .applicant1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .applicant1DQExperts(Experts.builder().expertRequired(NO).build()) .applicant1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .applicant1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .applicant1DQRequestedCourt(RequestedCourt.builder().build()) .applicant1DQHearingSupport(HearingSupport.builder() - .supportRequirements(YES) - .supportRequirementsAdditional("Additional support needed") - .requirements(List.of()).build()) + .supportRequirements(YES) + .supportRequirementsAdditional("Additional support needed") + .requirements(List.of()).build()) .applicant1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .applicant1DQLanguage(WelshLanguageRequirements.builder().build()) .applicant1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .applicant1DQStatementOfTruth(StatementOfTruth.builder().name("Bob Jones").role("Solicitor").build()) .build(); return this; @@ -1334,14 +1334,14 @@ public CaseDataBuilder applicant1DQWithExperts() { .jointExpertSuitable(NO) .details( wrapElements(uk.gov.hmcts.reform.civil.model.dq.Expert.builder() - .firstName("Expert") - .lastName("One") - .phoneNumber("01482764322") - .emailAddress("fast.claim.expert1@example.com") - .whyRequired("Good reasons") - .fieldOfExpertise("Some field") - .estimatedCost(BigDecimal.valueOf(10000)) - .build() + .firstName("Expert") + .lastName("One") + .phoneNumber("01482764322") + .emailAddress("fast.claim.expert1@example.com") + .whyRequired("Good reasons") + .fieldOfExpertise("Some field") + .estimatedCost(BigDecimal.valueOf(10000)) + .build() ) ) .build() @@ -1392,14 +1392,14 @@ public CaseDataBuilder respondent1DQSmallClaimExperts(ExpertDetails experts, Yes ExpertDetails expertDetails = experts != null ? experts : (ExpertDetails.builder() - .expertName("Mr Expert Defendant") - .firstName("Expert") - .lastName("Defendant") - .phoneNumber("07123456789") - .emailAddress("test@email.com") - .fieldofExpertise("Roofing") - .estimatedCost(new BigDecimal(434)) - .build()); + .expertName("Mr Expert Defendant") + .firstName("Expert") + .lastName("Defendant") + .phoneNumber("07123456789") + .emailAddress("test@email.com") + .fieldofExpertise("Roofing") + .estimatedCost(new BigDecimal(434)) + .build()); respondent1DQBuilder.respondToClaimExperts(expertDetails).build(); respondent1DQ = respondent1DQBuilder.build(); @@ -1414,14 +1414,14 @@ public CaseDataBuilder respondent2DQSmallClaimExperts(ExpertDetails experts, Yes ExpertDetails expertDetails = experts != null ? experts : (ExpertDetails.builder() - .expertName("Mr Expert Defendant") - .firstName("Expert") - .lastName("Defendant") - .phoneNumber("07123456789") - .emailAddress("test@email.com") - .fieldofExpertise("Roofing") - .estimatedCost(new BigDecimal(434)) - .build()); + .expertName("Mr Expert Defendant") + .firstName("Expert") + .lastName("Defendant") + .phoneNumber("07123456789") + .emailAddress("test@email.com") + .fieldofExpertise("Roofing") + .estimatedCost(new BigDecimal(434)) + .build()); respondent2DQBuilder.respondToClaimExperts2(expertDetails).build(); respondent2DQ = respondent2DQBuilder.build(); @@ -1483,29 +1483,29 @@ public CaseDataBuilder applicant2DQSmallClaimExperts(ExpertDetails experts, YesO public CaseDataBuilder applicant1DQWithLocation() { applicant1DQ = Applicant1DQ.builder() .applicant1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("OTHER")) - .oneMonthStayRequested(NO) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("OTHER")) + .oneMonthStayRequested(NO) + .reactionProtocolCompliedWith(YES) + .build()) .applicant1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .applicant1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .applicant1DQExperts(Experts.builder().expertRequired(NO).build()) .applicant1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .applicant1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .applicant1DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("court4") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("court4") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .applicant1DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .applicant1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .applicant1DQLanguage(WelshLanguageRequirements.builder().build()) .applicant1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .applicant1DQStatementOfTruth(StatementOfTruth.builder().name("Bob Jones").role("Solicitor").build()) .build(); return this; @@ -1514,64 +1514,64 @@ public CaseDataBuilder applicant1DQWithLocation() { public CaseDataBuilder applicant1DQWithFixedRecoverableCosts() { applicant1DQ = applicant1DQ.toBuilder() .applicant1DQFixedRecoverableCosts(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .build()).build(); return this; } public CaseDataBuilder applicant2DQWithFixedRecoverableCosts() { applicant2DQ = applicant2DQ.toBuilder() .applicant2DQFixedRecoverableCosts(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .build()).build(); return this; } public CaseDataBuilder applicant1DQWithFixedRecoverableCostsIntermediate() { applicant1DQ = applicant1DQ.toBuilder() .applicant1DQFixedRecoverableCostsIntermediate(FixedRecoverableCosts.builder() - .isSubjectToFixedRecoverableCostRegime(YES) - .band(BAND_1) - .complexityBandingAgreed(YES) - .reasons("Good reason") - .frcSupportingDocument( - DocumentBuilder.builder() - .documentName("frc-doc1").build()) - .build()).build(); + .isSubjectToFixedRecoverableCostRegime(YES) + .band(BAND_1) + .complexityBandingAgreed(YES) + .reasons("Good reason") + .frcSupportingDocument( + DocumentBuilder.builder() + .documentName("frc-doc1").build()) + .build()).build(); return this; } public CaseDataBuilder applicant1DQWithLocationWithoutExperts() { applicant1DQ = Applicant1DQ.builder() .applicant1DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("OTHER")) - .oneMonthStayRequested(NO) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("OTHER")) + .oneMonthStayRequested(NO) + .reactionProtocolCompliedWith(YES) + .build()) .applicant1DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .applicant1DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .applicant1DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .applicant1DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .applicant1DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("court4") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("court4") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .applicant1DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .applicant1DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .applicant1DQLanguage(WelshLanguageRequirements.builder().build()) .applicant1DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .applicant1DQStatementOfTruth(StatementOfTruth.builder().name("Bob Jones").role("Solicitor").build()) .build(); return this; @@ -1580,29 +1580,29 @@ public CaseDataBuilder applicant1DQWithLocationWithoutExperts() { public CaseDataBuilder applicant2DQWithLocation() { applicant2DQ = Applicant2DQ.builder() .applicant2DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("OTHER")) - .oneMonthStayRequested(NO) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("OTHER")) + .oneMonthStayRequested(NO) + .reactionProtocolCompliedWith(YES) + .build()) .applicant2DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .applicant2DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .applicant2DQExperts(Experts.builder().expertRequired(NO).build()) .applicant2DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .applicant2DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .applicant2DQRequestedCourt(RequestedCourt.builder() - .responseCourtCode("court4") - .caseLocation(CaseLocationCivil.builder() - .baseLocation("dummy base").region("dummy region") - .build()).build()) + .responseCourtCode("court4") + .caseLocation(CaseLocationCivil.builder() + .baseLocation("dummy base").region("dummy region") + .build()).build()) .applicant2DQHearingSupport(HearingSupport.builder().requirements(List.of()).build()) .applicant2DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .applicant2DQLanguage(WelshLanguageRequirements.builder().build()) .applicant2DQVulnerabilityQuestions(VulnerabilityQuestions.builder() - .vulnerabilityAdjustmentsRequired(NO).build()) + .vulnerabilityAdjustmentsRequired(NO).build()) .applicant2DQStatementOfTruth(StatementOfTruth.builder().name("Bob Jones").role("Solicitor").build()) .build(); return this; @@ -1611,24 +1611,24 @@ public CaseDataBuilder applicant2DQWithLocation() { public CaseDataBuilder applicant2DQ() { applicant2DQ = Applicant2DQ.builder() .applicant2DQFileDirectionsQuestionnaire(FileDirectionsQuestionnaire.builder() - .explainedToClient(List.of("OTHER")) - .oneMonthStayRequested(NO) - .reactionProtocolCompliedWith(YES) - .build()) + .explainedToClient(List.of("OTHER")) + .oneMonthStayRequested(NO) + .reactionProtocolCompliedWith(YES) + .build()) .applicant2DQDisclosureOfElectronicDocuments(DisclosureOfElectronicDocuments.builder() - .reachedAgreement(YES) - .build()) + .reachedAgreement(YES) + .build()) .applicant2DQDisclosureOfNonElectronicDocuments(DisclosureOfNonElectronicDocuments.builder() - .directionsForDisclosureProposed(NO) - .build()) + .directionsForDisclosureProposed(NO) + .build()) .applicant2DQExperts(Experts.builder().expertRequired(NO).build()) .applicant2DQWitnesses(Witnesses.builder().witnessesToAppear(NO).build()) .applicant2DQHearing(Hearing.builder().hearingLength(ONE_DAY).unavailableDatesRequired(NO).build()) .applicant2DQRequestedCourt(RequestedCourt.builder().build()) .applicant2DQHearingSupport(HearingSupport.builder() - .supportRequirements(YES) - .supportRequirementsAdditional("Additional support needed") - .requirements(List.of()).build()) + .supportRequirements(YES) + .supportRequirementsAdditional("Additional support needed") + .requirements(List.of()).build()) .applicant2DQFurtherInformation(FurtherInformation.builder().futureApplications(NO).build()) .applicant2DQLanguage(WelshLanguageRequirements.builder().build()) .applicant2DQStatementOfTruth(StatementOfTruth.builder().name("Bob Jones").role("Solicitor").build()) @@ -1949,8 +1949,8 @@ public CaseDataBuilder uiStatementOfTruth(StatementOfTruth statementOfTruth) { public CaseDataBuilder defendantSolicitorNotifyClaimOptions(String defaultValue) { this.defendantSolicitorNotifyClaimOptions = DynamicList.builder() .value(DynamicListElement.builder() - .label(defaultValue) - .build()) + .label(defaultValue) + .build()) .build(); return this; } @@ -1958,8 +1958,8 @@ public CaseDataBuilder defendantSolicitorNotifyClaimOptions(String defaultValue) public CaseDataBuilder defendantSolicitorNotifyClaimDetailsOptions(String defaultValue) { this.defendantSolicitorNotifyClaimDetailsOptions = DynamicList.builder() .value(DynamicListElement.builder() - .label(defaultValue) - .build()) + .label(defaultValue) + .build()) .build(); return this; } @@ -1967,8 +1967,8 @@ public CaseDataBuilder defendantSolicitorNotifyClaimDetailsOptions(String defaul public CaseDataBuilder selectLitigationFriend(String defaultValue) { this.selectLitigationFriend = DynamicList.builder() .value(DynamicListElement.builder() - .label(defaultValue) - .build()) + .label(defaultValue) + .build()) .build(); return this; } @@ -2482,9 +2482,9 @@ public CaseDataBuilder courtLocation() { this.courtLocation = CourtLocation.builder() .applicantPreferredCourt("127") .caseLocation(CaseLocationCivil.builder() - .region("2") - .baseLocation("000000") - .build()) + .region("2") + .baseLocation("000000") + .build()) .build(); return this; } @@ -2499,9 +2499,9 @@ public CaseDataBuilder atStateClaimDraft() { .applicantPreferredCourtLocationList( DynamicList.builder().value(DynamicListElement.builder().label("sitename").build()).build()) .caseLocation(CaseLocationCivil.builder() - .region("10") - .baseLocation("214320") - .build()) + .region("10") + .baseLocation("214320") + .build()) .build(); uploadParticularsOfClaim = NO; claimValue = ClaimValue.builder() @@ -2552,9 +2552,9 @@ public CaseDataBuilder atStateClaimDraftLip() { .applicantPreferredCourtLocationList( DynamicList.builder().value(DynamicListElement.builder().label("sitename").build()).build()) .caseLocation(CaseLocationCivil.builder() - .region("10") - .baseLocation("214320") - .build()) + .region("10") + .baseLocation("214320") + .build()) .build(); uploadParticularsOfClaim = NO; claimValue = ClaimValue.builder() @@ -2832,19 +2832,19 @@ public CaseDataBuilder atStateClaimIssued1v2AndOneDefendantDefaultJudgment() { public CaseDataBuilder atRespondToClaimWithSingleUnAvailabilityDate() { - return this; + return this; } public CaseDataBuilder atStateSdoFastTrackTrial() { fastTrackHearingTime = FastTrackHearingTime.builder() .helpText1("If either party considers that the time estimate is insufficient, " - + "they must inform the court within 7 days of the date of this order.") + + "they must inform the court within 7 days of the date of this order.") .helpText2("Not more than seven nor less than three clear days before the trial, " - + "the claimant must file at court and serve an indexed and paginated bundle of " - + "documents which complies with the requirements of Rule 39.5 Civil Procedure Rules " - + "and which complies with requirements of PD32. The parties must endeavour to agree " - + "the contents of the bundle before it is filed. The bundle will include a case " - + "summary and a chronology.") + + "the claimant must file at court and serve an indexed and paginated bundle of " + + "documents which complies with the requirements of Rule 39.5 Civil Procedure Rules " + + "and which complies with requirements of PD32. The parties must endeavour to agree " + + "the contents of the bundle before it is filed. The bundle will include a case " + + "summary and a chronology.") .hearingDuration(FastTrackHearingTimeEstimate.ONE_HOUR) .dateFrom(LocalDate.parse("2022-01-01")) .dateTo(LocalDate.parse("2022-01-02")) @@ -2852,10 +2852,10 @@ public CaseDataBuilder atStateSdoFastTrackTrial() { .build(); fastTrackOrderWithoutJudgement = FastTrackOrderWithoutJudgement.builder() .input(String.format("Each party has the right to apply " - + "to have this Order set aside or varied. Any such application must be " - + "received by the Court (together with the appropriate fee) by 4pm " - + "on %s.", - LocalDate.parse("2022-01-30"))) + + "to have this Order set aside or varied. Any such application must be " + + "received by the Court (together with the appropriate fee) by 4pm " + + "on %s.", + LocalDate.parse("2022-01-30"))) .build(); return this; } @@ -2863,33 +2863,33 @@ public CaseDataBuilder atStateSdoFastTrackTrial() { public CaseDataBuilder atStateSdoFastTrackCreditHire() { sdoR2FastTrackCreditHireDetails = SdoR2FastTrackCreditHireDetails.builder() .input2("The claimant must upload to the Digital Portal a witness statement addressing\n" - + "a) the need to hire a replacement vehicle; and\n" - + "b) impecuniosity") + + "a) the need to hire a replacement vehicle; and\n" + + "b) impecuniosity") .date1(LocalDate.parse("2022-01-01")) .input3("A failure to comply with the paragraph above will result in the claimant being debarred from " - + "asserting need or relying on impecuniosity as the case may be at the final hearing, " - + "save with permission of the Trial Judge.") + + "asserting need or relying on impecuniosity as the case may be at the final hearing, " + + "save with permission of the Trial Judge.") .input4("The parties are to liaise and use reasonable endeavours to agree the basic hire rate no " - + "later than 4pm on") + + "later than 4pm on") .date2(LocalDate.parse("2022-01-02")) .build(); sdoR2FastTrackCreditHire = SdoR2FastTrackCreditHire.builder() .input1("If impecuniosity is alleged by the claimant and not admitted by the defendant, the claimant's " - + "disclosure as ordered earlier in this Order must include:\n" - + "a) Evidence of all income from all sources for a period of 3 months prior to the " - + "commencement of hire until the earlier of:\n " - + " i) 3 months after cessation of hire\n" - + " ii) the repair or replacement of the claimant's vehicle\n" - + "b) Copies of all bank, credit card, and saving account statements for a period of 3 months " - + "prior to the commencement of hire until the earlier of:\n" - + " i) 3 months after cessation of hire\n" - + " ii) the repair or replacement of the claimant's vehicle\n" - + "c) Evidence of any loan, overdraft or other credit facilities available to the claimant.") + + "disclosure as ordered earlier in this Order must include:\n" + + "a) Evidence of all income from all sources for a period of 3 months prior to the " + + "commencement of hire until the earlier of:\n " + + " i) 3 months after cessation of hire\n" + + " ii) the repair or replacement of the claimant's vehicle\n" + + "b) Copies of all bank, credit card, and saving account statements for a period of 3 months " + + "prior to the commencement of hire until the earlier of:\n" + + " i) 3 months after cessation of hire\n" + + " ii) the repair or replacement of the claimant's vehicle\n" + + "c) Evidence of any loan, overdraft or other credit facilities available to the claimant.") .input5("If the parties fail to agree rates subject to liability and/or other issues pursuant to the " - + "paragraph above, each party may rely upon written evidence by way of witness statement of " - + "one witness to provide evidence of basic hire rates available within the claimant's " - + "geographical location, from a mainstream supplier, or a local reputable supplier if none " - + "is available.") + + "paragraph above, each party may rely upon written evidence by way of witness statement of " + + "one witness to provide evidence of basic hire rates available within the claimant's " + + "geographical location, from a mainstream supplier, or a local reputable supplier if none " + + "is available.") .input6("The defendant's evidence is to be uploaded to the Digital Portal by 4pm on") .date3(LocalDate.parse("2022-01-01")) .input7("and the claimant's evidence in reply if so advised to be uploaded by 4pm on") @@ -2903,11 +2903,11 @@ public CaseDataBuilder atStateSdoFastTrackCreditHire() { public CaseDataBuilder atStateSdoDisposal() { disposalOrderWithoutHearing = DisposalOrderWithoutHearing.builder() - .input(String.format( - "Each party has the right to apply to have this Order set " - + "aside or varied. Any such application must be received " - + "by the Court (together with the appropriate fee) " - + "by 4pm on %s.", LocalDate.parse("2022-01-30"))) + .input(String.format( + "Each party has the right to apply to have this Order set " + + "aside or varied. Any such application must be received " + + "by the Court (together with the appropriate fee) " + + "by 4pm on %s.", LocalDate.parse("2022-01-30"))) .build(); disposalHearingHearingTime = DisposalHearingHearingTime.builder() .input("This claim will be listed for final disposal before a judge on the first available date after") @@ -2955,9 +2955,9 @@ public CaseDataBuilder atStateClaimantRequestsDJWithUnavailableDates() { .build(); this.defaultJudgmentDocuments.addAll(wrapElements(CaseDocument.builder() - .documentName("test") - .createdDatetime(LocalDateTime.now()) - .build())); + .documentName("test") + .createdDatetime(LocalDateTime.now()) + .build())); return this; } @@ -3076,13 +3076,13 @@ public CaseDataBuilder atStateSdoTrialDj() { List dateToShowTrue = List.of(DateToShowToggle.SHOW); trialHearingTimeDJ = TrialHearingTimeDJ.builder() .helpText1("If either party considers that the time estimate is insufficient, " - + "they must inform the court within 7 days of the date of this order.") + + "they must inform the court within 7 days of the date of this order.") .helpText2("Not more than seven nor less than three clear days before the trial, " - + "the claimant must file at court and serve an indexed and paginated bundle of " - + "documents which complies with the requirements of Rule 39.5 Civil Procedure Rules " - + "and which complies with requirements of PD32. The parties must endeavour to agree " - + "the contents of the bundle before it is filed. The bundle will include a case " - + "summary and a chronology.") + + "the claimant must file at court and serve an indexed and paginated bundle of " + + "documents which complies with the requirements of Rule 39.5 Civil Procedure Rules " + + "and which complies with requirements of PD32. The parties must endeavour to agree " + + "the contents of the bundle before it is filed. The bundle will include a case " + + "summary and a chronology.") .hearingTimeEstimate(TrialHearingTimeEstimateDJ.ONE_HOUR) .dateToToggle(dateToShowTrue) .date1(LocalDate.now().plusWeeks(22)) @@ -3090,10 +3090,10 @@ public CaseDataBuilder atStateSdoTrialDj() { .build(); trialOrderMadeWithoutHearingDJ = TrialOrderMadeWithoutHearingDJ.builder() .input("This order has been made without a hearing. " - + "Each party has the right to apply to have this Order " - + "set aside or varied. Any such application must be " - + "received by the Court " - + "(together with the appropriate fee) by 4pm on 01 12 2022.") + + "Each party has the right to apply to have this Order " + + "set aside or varied. Any such application must be " + + "received by the Court " + + "(together with the appropriate fee) by 4pm on 01 12 2022.") .build(); return this; } @@ -3105,18 +3105,18 @@ public CaseDataBuilder atStateClaimIssuedTrialHearingInfo() { .date1(LocalDate.now().plusWeeks(22)) .date2(LocalDate.now().plusWeeks(34)) .input2("If either party considers that the time estimates is" - + " insufficient, they must inform the court within " - + "7 days of the date of this order.") + + " insufficient, they must inform the court within " + + "7 days of the date of this order.") .input3("Not more than seven nor less than three clear days before " - + "the trial, the claimant must file at court and serve an" - + "indexed and paginated bundle of documents which complies" - + " with the requirements of Rule 39.5 Civil " - + "Procedure Rules" - + " and Practice Direction 39A. The parties must " - + "endeavour to agree the contents of the " - + "bundle before it is filed. " - + "The bundle will include a case summary" - + " and a chronology.") + + "the trial, the claimant must file at court and serve an" + + "indexed and paginated bundle of documents which complies" + + " with the requirements of Rule 39.5 Civil " + + "Procedure Rules" + + " and Practice Direction 39A. The parties must " + + "endeavour to agree the contents of the " + + "bundle before it is filed. " + + "The bundle will include a case summary" + + " and a chronology.") .type(List.of(DisposalHearingBundleType.DOCUMENTS)) .build(); return this; @@ -3125,14 +3125,14 @@ public CaseDataBuilder atStateClaimIssuedTrialHearingInfo() { public CaseDataBuilder atStateClaimIssuedDisposalHearingInPerson() { disposalHearingBundleDJ = DisposalHearingBundleDJ.builder() .input("The claimant must lodge at court at least 7 " - + "days before the disposal") + + "days before the disposal") .type(List.of(DisposalHearingBundleType.DOCUMENTS)) .build(); disposalHearingFinalDisposalHearingDJ = DisposalHearingFinalDisposalHearingDJ .builder() .input("This claim be listed for final " - + "disposal before a Judge on the first " - + "available date after.") + + "disposal before a Judge on the first " + + "available date after.") .date(LocalDate.now().plusWeeks(16)) .time(DisposalHearingFinalDisposalHearingTimeEstimate.THIRTY_MINUTES) .build(); @@ -3143,8 +3143,8 @@ public CaseDataBuilder atStateClaimIssuedDisposalHearingInPersonDJ() { disposalHearingFinalDisposalHearingTimeDJ = DisposalHearingFinalDisposalHearingTimeDJ .builder() .input("This claim be listed for final " - + "disposal before a Judge on the first " - + "available date after.") + + "disposal before a Judge on the first " + + "available date after.") .date(LocalDate.now().plusWeeks(16)) .time(uk.gov.hmcts.reform.civil.enums.sdo.DisposalHearingFinalDisposalHearingTimeEstimate.THIRTY_MINUTES) .build(); @@ -3328,7 +3328,8 @@ public CaseDataBuilder atStateClaimIssued1v1LiPBilingual() { atStateClaimIssued1v1LiP(); this.applicant1Represented = NO; this.claimantBilingualLanguagePreference = Language.BOTH.toString(); - this.caseDataLiP = CaseDataLiP.builder().respondent1LiPResponse(RespondentLiPResponse.builder().respondent1ResponseLanguage(Language.BOTH.toString()).build()).build(); + this.caseDataLiP = CaseDataLiP.builder() + .respondent1LiPResponse(RespondentLiPResponse.builder().respondent1ResponseLanguage(Language.BOTH.toString()).build()).build(); setClaimTypeToSpecClaim(); return this; } @@ -3353,17 +3354,17 @@ public CaseDataBuilder changeOrganisationRequestField(boolean isApplicant, boole .requestTimestamp(LocalDateTime.now()) .createdBy(email) .caseRoleId(DynamicList.builder() - .value(DynamicListElement.builder() - .code(caseRole) - .label(caseRole) - .build()) - .build()) + .value(DynamicListElement.builder() + .code(caseRole) + .label(caseRole) + .build()) + .build()) .organisationToAdd(Organisation.builder() - .organisationID(newOrgID) - .build()) + .organisationID(newOrgID) + .build()) .organisationToRemove(Organisation.builder() - .organisationID(oldOrgId) - .build()) + .organisationID(oldOrgId) + .build()) .approvalStatus(ChangeOrganisationApprovalStatus.APPROVED) .build(); return this; @@ -3437,7 +3438,7 @@ public CaseDataBuilder atStateClaimNotified_1v2_andNotifyOnlyOneSolicitor() { return this; } - public CaseDataBuilder atStateClaimNotified1v1LiP(CertificateOfService certificateOfService) { + public CaseDataBuilder atStateClaimNotified1v1LiP(CertificateOfService certificateOfService) { atStatePendingClaimIssued(); ccdState = CASE_ISSUED; respondent1Represented = NO; @@ -3854,16 +3855,16 @@ public CaseDataBuilder atStateRespondentFullDefenceWithHearingSupport() { .responseCourtCode("121") .reasonForHearingAtSpecificCourt("test") .caseLocation(CaseLocationCivil.builder() - .region("2") - .baseLocation("000000") - .build()).build()) + .region("2") + .baseLocation("000000") + .build()).build()) .respondent1DQHearingSupport(HearingSupport.builder() - .requirements(List.of(SupportRequirements.values())) - .languageToBeInterpreted("English") - .signLanguageRequired("Spanish") - .otherSupport("other support") - .supportRequirements(YES) - .supportRequirementsAdditional("additional support").build()).build(); + .requirements(List.of(SupportRequirements.values())) + .languageToBeInterpreted("English") + .signLanguageRequired("Spanish") + .otherSupport("other support") + .supportRequirements(YES) + .supportRequirementsAdditional("additional support").build()).build(); respondent1ClaimResponseDocument = ResponseDocument.builder() .file(DocumentBuilder.builder().documentName("defendant1-defence.pdf").build()) .build(); @@ -4213,7 +4214,7 @@ public CaseDataBuilder atStateBothRespondentsSameResponse1v2SameSolicitor(Respon } public CaseDataBuilder atState1v2SameSolicitorDivergentResponse(RespondentResponseType respondent1Response, - RespondentResponseType respondent2Response) { + RespondentResponseType respondent2Response) { atStateClaimDetailsNotified(); respondent1ClaimResponseType = respondent1Response; respondent2Responds(respondent2Response); @@ -4259,10 +4260,10 @@ public CaseDataBuilder atStateRespondentFullAdmissionAfterNotificationAcknowledg public CaseDataBuilder addEnterBreathingSpace() { this.enter = BreathingSpaceEnterInfo.builder() - .type(BreathingSpaceType.STANDARD) - .reference("12345") - .start(LocalDate.now()) - .build(); + .type(BreathingSpaceType.STANDARD) + .reference("12345") + .start(LocalDate.now()) + .build(); this.breathing = BreathingSpaceInfo.builder().enter(this.enter).build(); @@ -4271,10 +4272,10 @@ public CaseDataBuilder addEnterBreathingSpace() { public CaseDataBuilder addEnterMentalHealthBreathingSpace() { this.enter = BreathingSpaceEnterInfo.builder() - .type(BreathingSpaceType.MENTAL_HEALTH) - .reference("12345") - .start(LocalDate.now()) - .build(); + .type(BreathingSpaceType.MENTAL_HEALTH) + .reference("12345") + .start(LocalDate.now()) + .build(); this.breathing = BreathingSpaceInfo.builder().enter(this.enter).build(); @@ -4662,9 +4663,9 @@ public CaseDataBuilder atStateTrialReadyApplicant() { atStateTrialReadyCheck(); trialReadyApplicant = YES; applicantRevisedHearingRequirements = RevisedHearingRequirements.builder() - .revisedHearingRequirements(YES) - .revisedHearingComments("Changes requested.") - .build(); + .revisedHearingRequirements(YES) + .revisedHearingComments("Changes requested.") + .build(); return this; } @@ -4684,9 +4685,9 @@ public CaseDataBuilder atStateTrialReadyRespondent1() { atStateTrialReadyCheck(); trialReadyRespondent1 = YES; respondent1RevisedHearingRequirements = RevisedHearingRequirements.builder() - .revisedHearingRequirements(YES) - .revisedHearingComments("Changes requested.") - .build(); + .revisedHearingRequirements(YES) + .revisedHearingComments("Changes requested.") + .build(); return this; } @@ -4704,9 +4705,9 @@ public CaseDataBuilder atStateTrialReadyRespondent2() { atStateTrialReadyCheck(); trialReadyRespondent2 = YES; applicantRevisedHearingRequirements = RevisedHearingRequirements.builder() - .revisedHearingRequirements(YES) - .revisedHearingComments("Changes requested.") - .build(); + .revisedHearingRequirements(YES) + .revisedHearingComments("Changes requested.") + .build(); return this; } @@ -4730,7 +4731,7 @@ public CaseDataBuilder atStateApplicantRespondToDefenceAndNotProceed() { } public CaseDataBuilder atState1v2SameSolicitorDivergentResponseSpec(RespondentResponseTypeSpec respondent1Response, - RespondentResponseTypeSpec respondent2Response) { + RespondentResponseTypeSpec respondent2Response) { atStateNotificationAcknowledged(); respondent1ClaimResponseTypeForSpec = respondent1Response; respondent2RespondsSpec(respondent2Response); @@ -4927,7 +4928,7 @@ public CaseDataBuilder atStateNotificationAcknowledged() { } public CaseDataBuilder atReconsiderationUpheld() { - decisionOnRequestReconsiderationOptions = DecisionOnRequestReconsiderationOptions.YES; + decisionOnRequestReconsiderationOptions = DecisionOnRequestReconsiderationOptions.YES; upholdingPreviousOrderReason = new UpholdingPreviousOrderReason("Reason to upheld "); return this; } @@ -5304,10 +5305,10 @@ public CaseDataBuilder atStateMediationUnsuccessful(MultiPartyScenario mpScenari atStateApplicantProceedAllMediation(mpScenario); applicantsProceedIntention = YES; caseDataLiP = CaseDataLiP.builder() - .applicant1ClaimMediationSpecRequiredLip( - ClaimantMediationLip.builder() - .hasAgreedFreeMediation(MediationDecision.Yes) - .build()).build(); + .applicant1ClaimMediationSpecRequiredLip( + ClaimantMediationLip.builder() + .hasAgreedFreeMediation(MediationDecision.Yes) + .build()).build(); mediation = Mediation.builder().unsuccessfulMediationReason("Unsuccessful").build(); @@ -5346,11 +5347,11 @@ public CaseDataBuilder atStateMediationSuccessful(MultiPartyScenario mpScenario) mediation = Mediation.builder() .mediationSuccessful(MediationSuccessful.builder() - .mediationSettlementAgreedAt(now()) - .mediationAgreement(MediationAgreementDocument.builder() - .name("mediation") - .build()) - .build()) + .mediationSettlementAgreedAt(now()) + .mediationAgreement(MediationAgreementDocument.builder() + .name("mediation") + .build()) + .build()) .build(); return this; @@ -5461,20 +5462,20 @@ public CaseDataBuilder addBothRespondent1LitigationFriend() { public CaseDataBuilder getGeneralApplicationWithStrikeOut(final String litigiousPartyID) { List types = Arrays.asList(STRIKE_OUT); List> generalApplicationValues = wrapElements( - GeneralApplication.builder() - .applicantPartyName("partyName") - .litigiousPartyID(litigiousPartyID) - .generalAppDateDeadline(DEADLINE) - .generalAppSubmittedDateGAspec(SUBMITTED_DATE_TIME) - .generalAppType(GAApplicationType.builder() - .types(types) - .build()) - - .caseLink(CaseLink.builder().caseReference("12345678").build()) - .businessProcess(BusinessProcess.builder() - .camundaEvent("NotifyRoboticsOnCaseHandedOffline") - .build()) - .build()); + GeneralApplication.builder() + .applicantPartyName("partyName") + .litigiousPartyID(litigiousPartyID) + .generalAppDateDeadline(DEADLINE) + .generalAppSubmittedDateGAspec(SUBMITTED_DATE_TIME) + .generalAppType(GAApplicationType.builder() + .types(types) + .build()) + + .caseLink(CaseLink.builder().caseReference("12345678").build()) + .businessProcess(BusinessProcess.builder() + .camundaEvent("NotifyRoboticsOnCaseHandedOffline") + .build()) + .build()); this.generalApplications = generalApplicationValues; return this; @@ -5482,12 +5483,12 @@ public CaseDataBuilder getGeneralApplicationWithStrikeOut(final String litigious public CaseDataBuilder getGeneralStrikeOutApplicationsDetailsWithCaseState(final String caseState) { List> generalApplicationsDetails = wrapElements( - GeneralApplicationsDetails.builder() - .generalApplicationType(STRIKE_OUT.getDisplayedValue()) - .caseState(caseState) - .generalAppSubmittedDateGAspec(SUBMITTED_DATE_TIME) - .caseLink(CaseLink.builder().caseReference("12345678").build()) - .build() + GeneralApplicationsDetails.builder() + .generalApplicationType(STRIKE_OUT.getDisplayedValue()) + .caseState(caseState) + .generalAppSubmittedDateGAspec(SUBMITTED_DATE_TIME) + .caseLink(CaseLink.builder().caseReference("12345678").build()) + .build() ); this.generalApplicationsDetails = generalApplicationsDetails; @@ -5578,11 +5579,11 @@ private List get2v1DifferentResponseCase() { for (RespondentResponseTypeSpec r2 : RespondentResponseTypeSpec.values()) { if (!r1.equals(r2)) { cases.add(CaseData.builder() - .applicant1(applicant1) - .applicant2(applicant2) - .claimant1ClaimResponseTypeForSpec(r1) - .claimant2ClaimResponseTypeForSpec(r2) - .build()); + .applicant1(applicant1) + .applicant2(applicant2) + .claimant1ClaimResponseTypeForSpec(r1) + .claimant2ClaimResponseTypeForSpec(r2) + .build()); } } } @@ -5660,9 +5661,9 @@ public CaseDataBuilder generateYearsAndMonthsIncorrectInput() { respondToClaimAdmitPartUnemployedLRspec = UnemployedComplexTypeLRspec.builder() .unemployedComplexTypeRequired("No") .lengthOfUnemployment(LengthOfUnemploymentComplexTypeLRspec.builder() - .numberOfMonthsInUnemployment("1.5") - .numberOfYearsInUnemployment("2.6") - .build()) + .numberOfMonthsInUnemployment("1.5") + .numberOfYearsInUnemployment("2.6") + .build()) .build(); return this; @@ -5727,7 +5728,7 @@ public CaseDataBuilder buildHmctsInternalCaseName() { String respondent2Name = respondent2 != null ? " and " + respondent2.getPartyName() : ""; this.caseNameHmctsInternal = String.format("%s%s v %s%s", applicant1.getPartyName(), - applicant2Name, respondent1.getPartyName(), respondent2Name); + applicant2Name, respondent1.getPartyName(), respondent2Name); return this; } @@ -5925,13 +5926,13 @@ public CaseData buildMakePaymentsCaseDataWithHearingDueDateWithHearingFeePBADeta .applicant1OrganisationPolicy(OrganisationPolicy.builder().organisation(orgId).build()) .hearingDueDate(LocalDate.now().plusWeeks(2)) .hearingFeePBADetails(SRPbaDetails.builder() - .fee( - Fee.builder() - .code("FE203") - .calculatedAmountInPence(BigDecimal.valueOf(27500)) - .version("1") - .build()) - .serviceReqReference(CUSTOMER_REFERENCE).build()) + .fee( + Fee.builder() + .code("FE203") + .calculatedAmountInPence(BigDecimal.valueOf(27500)) + .version("1") + .build()) + .serviceReqReference(CUSTOMER_REFERENCE).build()) .build(); } @@ -5939,16 +5940,16 @@ public CaseData withHearingFeePBADetailsPaymentFailed() { return build().toBuilder() .ccdCaseReference(1644495739087775L) .hearingFeePBADetails(SRPbaDetails.builder() - .fee( - Fee.builder() - .code("FE203") - .calculatedAmountInPence(BigDecimal.valueOf(27500)) - .version("1") - .build()) - .paymentDetails(PaymentDetails.builder() - .status(FAILED) - .build()) - .serviceReqReference(CUSTOMER_REFERENCE).build()) + .fee( + Fee.builder() + .code("FE203") + .calculatedAmountInPence(BigDecimal.valueOf(27500)) + .version("1") + .build()) + .paymentDetails(PaymentDetails.builder() + .status(FAILED) + .build()) + .serviceReqReference(CUSTOMER_REFERENCE).build()) .build(); } @@ -5956,16 +5957,16 @@ public CaseData withHearingFeePBADetailsPaymentSuccess() { return build().toBuilder() .ccdCaseReference(1644495739087775L) .hearingFeePBADetails(SRPbaDetails.builder() - .fee( - Fee.builder() - .code("FE203") - .calculatedAmountInPence(BigDecimal.valueOf(27500)) - .version("1") - .build()) - .paymentDetails(PaymentDetails.builder() - .status(SUCCESS) - .build()) - .serviceReqReference(CUSTOMER_REFERENCE).build()) + .fee( + Fee.builder() + .code("FE203") + .calculatedAmountInPence(BigDecimal.valueOf(27500)) + .version("1") + .build()) + .paymentDetails(PaymentDetails.builder() + .status(SUCCESS) + .build()) + .serviceReqReference(CUSTOMER_REFERENCE).build()) .build(); } @@ -5973,8 +5974,8 @@ public CaseData withHearingFeePBADetailsNoPaymentStatus() { return build().toBuilder() .ccdCaseReference(1644495739087775L) .claimValue(ClaimValue.builder() - .statementOfValueInPennies(BigDecimal.valueOf(10800)) - .build()) + .statementOfValueInPennies(BigDecimal.valueOf(10800)) + .build()) .allocatedTrack(SMALL_CLAIM) .applicant1OrganisationPolicy(OrganisationPolicy.builder().organisation( Organisation.builder() @@ -6053,13 +6054,13 @@ public CaseData buildMakePaymentsCaseDataWithHearingDateWithHearingFeePBADetails .applicant1OrganisationPolicy(OrganisationPolicy.builder().organisation(orgId).build()) .hearingDate(LocalDate.now().plusWeeks(2)) .hearingFeePBADetails(SRPbaDetails.builder() - .fee( - Fee.builder() - .code("FE203") - .calculatedAmountInPence(BigDecimal.valueOf(27500)) - .version("1") - .build()) - .serviceReqReference(CUSTOMER_REFERENCE).build()) + .fee( + Fee.builder() + .code("FE203") + .calculatedAmountInPence(BigDecimal.valueOf(27500)) + .version("1") + .build()) + .serviceReqReference(CUSTOMER_REFERENCE).build()) .build(); } @@ -6072,16 +6073,24 @@ public CaseData buildClaimIssuedPaymentCaseData() { .ccdState(PENDING_CASE_ISSUED) .claimFee( Fee.builder() - .code("FE203") - .calculatedAmountInPence(BigDecimal.valueOf(27500)) - .version("1") - .build()) + .code("FE203") + .calculatedAmountInPence(BigDecimal.valueOf(27500)) + .version("1") + .build()) .applicant1OrganisationPolicy(OrganisationPolicy.builder().organisation(orgId).build()) .applicant1(Party.builder() - .individualFirstName("First name") - .individualLastName("Second name") - .type(Party.Type.INDIVIDUAL) - .partyName("test").build()) + .individualFirstName("First name") + .individualLastName("Second name") + .type(Party.Type.INDIVIDUAL) + .partyName("test").build()) + .build(); + } + + public CaseData buildClaimIssuedPaymentCaseDataWithPba(String pbaAccountNumber) { + return this.buildClaimIssuedPaymentCaseData().toBuilder() + .applicantSolicitor1PbaAccounts(DynamicList.builder() + .value(DynamicListElement.dynamicElement(pbaAccountNumber)).build()) + .paymentReference("RC-1234-1234-1234-1234") .build(); } @@ -6097,10 +6106,10 @@ public CaseData buildPaymentFailureCaseData() { .claimIssuedPBADetails( SRPbaDetails.builder() .paymentDetails(PaymentDetails.builder() - .status(PaymentStatus.FAILED) - .reference("RC-1658-4258-2679-9795") - .customerReference(CUSTOMER_REFERENCE) - .build()) + .status(PaymentStatus.FAILED) + .reference("RC-1658-4258-2679-9795") + .customerReference(CUSTOMER_REFERENCE) + .build()) .fee( Fee.builder() .code("FE203") @@ -6128,10 +6137,10 @@ public CaseData buildPaymentSuccessfulCaseData() { LocalTime.of(12, 00, 00) )) .paymentDetails(PaymentDetails.builder() - .status(PaymentStatus.SUCCESS) - .reference("RC-1234-1234-1234-1234") - .customerReference(CUSTOMER_REFERENCE) - .build()) + .status(PaymentStatus.SUCCESS) + .reference("RC-1234-1234-1234-1234") + .customerReference(CUSTOMER_REFERENCE) + .build()) .fee( Fee.builder() .code("FE203") @@ -6149,9 +6158,9 @@ public CaseData buildJudmentOnlineCaseDataWithPaymentByInstalment() { .joJudgmentRecordReason(JudgmentRecordedReason.JUDGE_ORDER) .respondent1(PartyBuilder.builder().individual().build()) .joInstalmentDetails(JudgmentInstalmentDetails.builder() - .startDate(LocalDate.of(2022, 12, 12)) - .amount("120") - .paymentFrequency(PaymentFrequency.MONTHLY).build()) + .startDate(LocalDate.of(2022, 12, 12)) + .amount("120") + .paymentFrequency(PaymentFrequency.MONTHLY).build()) .joAmountOrdered("1200") .joAmountCostOrdered("1100") .joPaymentPlan(JudgmentPaymentPlan.builder().type(PaymentPlanSelection.PAY_IN_INSTALMENTS).build()) @@ -6166,9 +6175,9 @@ public CaseData buildJudgmentOnlineCaseDataWithDeterminationMeans() { .respondent1(PartyBuilder.builder().individual().build()) .joJudgmentRecordReason(JudgmentRecordedReason.DETERMINATION_OF_MEANS) .joInstalmentDetails(JudgmentInstalmentDetails.builder() - .startDate(LocalDate.of(2022, 12, 12)) - .amount("120") - .paymentFrequency(PaymentFrequency.MONTHLY).build()) + .startDate(LocalDate.of(2022, 12, 12)) + .amount("120") + .paymentFrequency(PaymentFrequency.MONTHLY).build()) .joAmountOrdered("1200") .joAmountCostOrdered("1100") .joPaymentPlan(JudgmentPaymentPlan.builder().type(PaymentPlanSelection.PAY_IN_INSTALMENTS).build()) @@ -6205,23 +6214,23 @@ public CaseData buildJudmentOnlineCaseDataWithPaymentImmediatelyWithOldAddress() .joOrderMadeDate(LocalDate.of(2022, 12, 12)) .caseManagementLocation(CaseLocationCivil.builder().baseLocation("0123").region("0321").build()) .respondent1(Party.builder() - .type(Party.Type.INDIVIDUAL) - .individualTitle("Mr.") - .individualFirstName("Alex") - .individualLastName( - "Richards Extra long name which exceeds 70 characters need to be trimmed down") - .partyName( - "Mr. Alex Richards Extra long name which exceeds 70 characters need to be trimmed down") - .partyEmail("respondent1@gmail.com") - .primaryAddress(Address.builder() - .addressLine1("Line 1 test again for more than 35 characters") - .addressLine2("Line 1 test again for more than 35 characters") - .addressLine3("Line 1 test again for more than 35 characters") - .county("Line 1 test again for more than 35 characters") - .postCode("Line 1 test again for more than 35 characters") - .postTown("Line 1 test again for more than 35 characters") - .build()) - .build()) + .type(Party.Type.INDIVIDUAL) + .individualTitle("Mr.") + .individualFirstName("Alex") + .individualLastName( + "Richards Extra long name which exceeds 70 characters need to be trimmed down") + .partyName( + "Mr. Alex Richards Extra long name which exceeds 70 characters need to be trimmed down") + .partyEmail("respondent1@gmail.com") + .primaryAddress(Address.builder() + .addressLine1("Line 1 test again for more than 35 characters") + .addressLine2("Line 1 test again for more than 35 characters") + .addressLine3("Line 1 test again for more than 35 characters") + .county("Line 1 test again for more than 35 characters") + .postCode("Line 1 test again for more than 35 characters") + .postTown("Line 1 test again for more than 35 characters") + .build()) + .build()) .joIsRegisteredWithRTL(YES).build(); } @@ -6233,8 +6242,8 @@ public CaseData buildJudgmentOnlineCaseDataWithPaymentByDate() { .joAmountOrdered("1200") .joAmountCostOrdered("1100") .joPaymentPlan(JudgmentPaymentPlan.builder() - .type(PaymentPlanSelection.PAY_BY_DATE) - .paymentDeadlineDate(LocalDate.of(2023, 12, 12)).build()) + .type(PaymentPlanSelection.PAY_BY_DATE) + .paymentDeadlineDate(LocalDate.of(2023, 12, 12)).build()) .joOrderMadeDate(LocalDate.of(2022, 12, 12)) .joIsRegisteredWithRTL(YES) .caseManagementLocation(CaseLocationCivil.builder().baseLocation("0123").region("0321").build()) @@ -6251,8 +6260,8 @@ public CaseData buildJudgmentOnlineCaseDataWithPaymentByDate_Multi_party() { .joAmountOrdered("1200") .joAmountCostOrdered("1100") .joPaymentPlan(JudgmentPaymentPlan.builder() - .type(PaymentPlanSelection.PAY_BY_DATE) - .paymentDeadlineDate(LocalDate.of(2023, 12, 12)).build()) + .type(PaymentPlanSelection.PAY_BY_DATE) + .paymentDeadlineDate(LocalDate.of(2023, 12, 12)).build()) .joOrderMadeDate(LocalDate.of(2022, 12, 12)) .joIsRegisteredWithRTL(YES) .caseManagementLocation(CaseLocationCivil.builder().baseLocation("0123").region("0321").build()) @@ -6265,9 +6274,9 @@ public CaseData buildJudgmentOnlineCaseWithMarkJudgementPaidAfter31Days() { .respondent1(PartyBuilder.builder().soleTrader().build()) .joOrderMadeDate(LocalDate.of(2023, 3, 1)) .joJudgmentPaidInFull(JudgmentPaidInFull.builder() - .dateOfFullPaymentMade(LocalDate.now().plusDays(35)) - .confirmFullPaymentMade(List.of("CONFIRMED")) - .build()) + .dateOfFullPaymentMade(LocalDate.now().plusDays(35)) + .confirmFullPaymentMade(List.of("CONFIRMED")) + .build()) .joIsRegisteredWithRTL(YES) .activeJudgment(JudgmentDetails.builder().issueDate(LocalDate.now()).build()) .locationName("Barnet Court") @@ -6281,13 +6290,13 @@ public CaseData buildJudgmentOnlineCaseWithMarkJudgementPaidWithin31Days() { .respondent1(PartyBuilder.builder().soleTrader().build()) .joOrderMadeDate(LocalDate.of(2023, 3, 1)) .joJudgmentPaidInFull(JudgmentPaidInFull.builder() - .dateOfFullPaymentMade(LocalDate.now().plusDays(15)) - .confirmFullPaymentMade(List.of("CONFIRMED")) - .build()) + .dateOfFullPaymentMade(LocalDate.now().plusDays(15)) + .confirmFullPaymentMade(List.of("CONFIRMED")) + .build()) .joIsRegisteredWithRTL(YES) .caseManagementLocation(CaseLocationCivil.builder() - .baseLocation("231596") - .region("2").build()) + .baseLocation("231596") + .region("2").build()) .legacyCaseReference("000MC015") .activeJudgment(JudgmentDetails.builder().issueDate(LocalDate.now()).build()) .build(); @@ -6309,7 +6318,7 @@ public CaseData buildJudgmentOnlineCaseWithMarkJudgementPaidWithin31DaysForCosc( } public CaseData buildJudgmentOnlineCaseWithMarkJudgementPaidAfter31DaysForCosc() { - CaseData caseData = buildJudgmentOnlineCaseWithMarkJudgementPaidAfter31Days(); + CaseData caseData = buildJudgmentOnlineCaseWithMarkJudgementPaidAfter31Days(); JudgmentDetails activeJudgment = JudgmentDetails.builder() .defendant1Name("Test name") .defendant1Address(JudgmentAddress.builder().build()) @@ -6333,10 +6342,10 @@ public CaseData getDefaultJudgment1v1Case() { .partialPayment(YesOrNo.YES) .caseManagementLocation(CaseLocationCivil.builder().baseLocation("0123").region("0321").build()) .defendantDetailsSpec(DynamicList.builder() - .value(DynamicListElement.builder() - .label("Test User") - .build()) - .build()) + .value(DynamicListElement.builder() + .label("Test User") + .build()) + .build()) .build(); } @@ -6355,10 +6364,10 @@ public CaseData getDefaultJudgment1v2DivergentCase() { .partialPayment(YesOrNo.YES) .caseManagementLocation(CaseLocationCivil.builder().baseLocation("0123").region("0321").build()) .defendantDetailsSpec(DynamicList.builder() - .value(DynamicListElement.builder() - .label("John Smith") - .build()) - .build()) + .value(DynamicListElement.builder() + .label("John Smith") + .build()) + .build()) .build(); } @@ -6373,14 +6382,14 @@ public CaseData getDefaultJudgment1v1CaseJudgmentPaid() { .partialPayment(YesOrNo.YES) .caseManagementLocation(CaseLocationCivil.builder().baseLocation("0123").region("0321").build()) .defendantDetailsSpec(DynamicList.builder() - .value(DynamicListElement.builder() - .label("Test User") - .build()) - .build()) + .value(DynamicListElement.builder() + .label("Test User") + .build()) + .build()) .joJudgmentPaidInFull(JudgmentPaidInFull.builder() - .dateOfFullPaymentMade(LocalDate.now().plusDays(15)) - .confirmFullPaymentMade(List.of("CONFIRMED")) - .build()) + .dateOfFullPaymentMade(LocalDate.now().plusDays(15)) + .confirmFullPaymentMade(List.of("CONFIRMED")) + .build()) .activeJudgment(JudgmentDetails.builder().issueDate(LocalDate.now()).build()) .build(); } @@ -6405,15 +6414,15 @@ public CaseDataBuilder setCoSClaimDetailsWithDate(boolean setCos1, boolean setCo LocalDate cos1Date, LocalDate deemed1Date, LocalDate cos2Date, LocalDate deemed2Date, boolean file1, boolean file2) { List> files = wrapElements(Document.builder() - .documentUrl("fake-url") - .documentFileName("file-name") - .documentBinaryUrl("binary-url") - .build()); + .documentUrl("fake-url") + .documentFileName("file-name") + .documentBinaryUrl("binary-url") + .build()); List> files2 = wrapElements(Document.builder() - .documentUrl("fake-url2") - .documentFileName("file-name2") - .documentBinaryUrl("binary-url2") - .build()); + .documentUrl("fake-url2") + .documentFileName("file-name2") + .documentBinaryUrl("binary-url2") + .build()); ArrayList cosUIStatement = new ArrayList<>(); cosUIStatement.add("CERTIFIED"); if (setCos1) { @@ -6480,136 +6489,136 @@ public CaseDataBuilder respondToAdmittedClaimOwingAmountPounds(BigDecimal admite public CaseDataBuilder addApplicant1ExpertsAndWitnesses() { this.applicant1DQ = applicant1DQ.toBuilder() .applicant1DQExperts(Experts.builder() - .expertRequired(YES) - .details(wrapElements( - Expert.builder() - .firstName("Applicant") - .lastName("Expert") - .build() - )) - .build()) + .expertRequired(YES) + .details(wrapElements( + Expert.builder() + .firstName("Applicant") + .lastName("Expert") + .build() + )) + .build()) .applicant1DQWitnesses(Witnesses.builder() - .witnessesToAppear(YES) - .details(wrapElements( - Witness.builder() - .firstName("Applicant") - .lastName("Witness") - .build() - )) - .build()) + .witnessesToAppear(YES) + .details(wrapElements( + Witness.builder() + .firstName("Applicant") + .lastName("Witness") + .build() + )) + .build()) .build(); this.applicantExperts = wrapElements(PartyFlagStructure.builder() - .partyID("app-1-expert-party-id") - .firstName("Applicant") - .lastName("Expert") - .build()); + .partyID("app-1-expert-party-id") + .firstName("Applicant") + .lastName("Expert") + .build()); this.applicantWitnesses = wrapElements(PartyFlagStructure.builder() - .partyID("app-1-witness-party-id") - .firstName("Applicant") - .lastName("Witness") - .build()); + .partyID("app-1-witness-party-id") + .firstName("Applicant") + .lastName("Witness") + .build()); return this; } public CaseDataBuilder addApplicant2ExpertsAndWitnesses() { this.applicant2DQ = applicant2DQ.toBuilder() .applicant2DQExperts(Experts.builder() - .expertRequired(YES) - .details(wrapElements( - Expert.builder() - .firstName("Applicant Two") - .lastName("Expert") - .build() - )) - .build()) + .expertRequired(YES) + .details(wrapElements( + Expert.builder() + .firstName("Applicant Two") + .lastName("Expert") + .build() + )) + .build()) .applicant2DQWitnesses(Witnesses.builder() - .witnessesToAppear(YES) - .details(wrapElements( - Witness.builder() - .firstName("Applicant Two") - .lastName("Witness") - .build() - )) - .build()) + .witnessesToAppear(YES) + .details(wrapElements( + Witness.builder() + .firstName("Applicant Two") + .lastName("Witness") + .build() + )) + .build()) .build(); this.applicantExperts = wrapElements(PartyFlagStructure.builder() - .partyID("app-2-expert-party-id") - .firstName("Applicant Two") - .lastName("Expert") - .build()); + .partyID("app-2-expert-party-id") + .firstName("Applicant Two") + .lastName("Expert") + .build()); this.applicantWitnesses = wrapElements(PartyFlagStructure.builder() - .partyID("app-2-witness-party-id") - .firstName("Applicant Two") - .lastName("Witness") - .build()); + .partyID("app-2-witness-party-id") + .firstName("Applicant Two") + .lastName("Witness") + .build()); return this; } public CaseDataBuilder addRespondent1ExpertsAndWitnesses() { this.respondent1DQ = respondent1DQ.toBuilder() .respondent1DQExperts(Experts.builder() - .expertRequired(YES) - .details(wrapElements( - Expert.builder() - .firstName("Respondent") - .lastName("Expert") - .build() - )) - .build()) + .expertRequired(YES) + .details(wrapElements( + Expert.builder() + .firstName("Respondent") + .lastName("Expert") + .build() + )) + .build()) .respondent1DQWitnesses(Witnesses.builder() - .witnessesToAppear(YES) - .details(wrapElements( - Witness.builder() - .firstName("Respondent") - .lastName("Witness") - .build() - )) - .build()) + .witnessesToAppear(YES) + .details(wrapElements( + Witness.builder() + .firstName("Respondent") + .lastName("Witness") + .build() + )) + .build()) .build(); this.respondent1Experts = wrapElements(PartyFlagStructure.builder() - .partyID("res-1-expert-party-id") - .firstName("Respondent") - .lastName("Expert") - .build()); + .partyID("res-1-expert-party-id") + .firstName("Respondent") + .lastName("Expert") + .build()); this.respondent1Witnesses = wrapElements(PartyFlagStructure.builder() - .partyID("res-1-witness-party-id") - .firstName("Respondent") - .lastName("Witness") - .build()); + .partyID("res-1-witness-party-id") + .firstName("Respondent") + .lastName("Witness") + .build()); return this; } public CaseDataBuilder addRespondent2ExpertsAndWitnesses() { this.respondent2DQ = respondent2DQ.toBuilder() .respondent2DQExperts(Experts.builder() - .expertRequired(YES) - .details(wrapElements( - Expert.builder() - .firstName("Respondent Two") - .lastName("Expert") - .build() - )) - .build()) + .expertRequired(YES) + .details(wrapElements( + Expert.builder() + .firstName("Respondent Two") + .lastName("Expert") + .build() + )) + .build()) .respondent2DQWitnesses(Witnesses.builder() - .witnessesToAppear(YES) - .details(wrapElements( - Witness.builder() - .firstName("Respondent Two") - .lastName("Witness") - .build() - )) - .build()) + .witnessesToAppear(YES) + .details(wrapElements( + Witness.builder() + .firstName("Respondent Two") + .lastName("Witness") + .build() + )) + .build()) .build(); this.respondent2Experts = wrapElements(PartyFlagStructure.builder() - .partyID("res-2-expert-party-id") - .firstName("Respondent Two") - .lastName("Expert") - .build()); + .partyID("res-2-expert-party-id") + .firstName("Respondent Two") + .lastName("Expert") + .build()); this.respondent2Witnesses = wrapElements(PartyFlagStructure.builder() - .partyID("res-2-witness-party-id") - .firstName("Respondent Two") - .lastName("Witness") - .build()); + .partyID("res-2-witness-party-id") + .firstName("Respondent Two") + .lastName("Witness") + .build()); return this; } @@ -6636,47 +6645,47 @@ public CaseDataBuilder withApplicant1Flags(List> flags) { this.applicant1 = applicant1.toBuilder() .partyID("app-1-party-id") .flags(Flags.builder() - .partyName(applicant1.getPartyName()) - .roleOnCase("Claimant 1") - .details(flags) - .build()) + .partyName(applicant1.getPartyName()) + .roleOnCase("Claimant 1") + .details(flags) + .build()) .build(); return this; } public CaseDataBuilder withApplicant1WitnessFlags() { this.applicantWitnesses = wrapElements(PartyFlagStructure.builder() - .firstName("W first") - .lastName("W last") - .flags(Flags.builder() - .partyName("W First W Last") - .roleOnCase("Claimant 1 Witness") - .details(flagDetails()) - .build()) - .build()); + .firstName("W first") + .lastName("W last") + .flags(Flags.builder() + .partyName("W First W Last") + .roleOnCase("Claimant 1 Witness") + .details(flagDetails()) + .build()) + .build()); return this; } public CaseDataBuilder withApplicant1ExpertFlags() { this.applicantExperts = wrapElements(PartyFlagStructure.builder() - .firstName("E first") - .lastName("E last") - .flags(Flags.builder() - .partyName("E First E Last") - .roleOnCase("Claimant 1 Expert") - .details(flagDetails()) - .build()) - .build()); + .firstName("E first") + .lastName("E last") + .flags(Flags.builder() + .partyName("E First E Last") + .roleOnCase("Claimant 1 Expert") + .details(flagDetails()) + .build()) + .build()); return this; } public CaseDataBuilder withApplicant1LitigationFriendFlags() { this.applicant1LitigationFriend = applicant1LitigationFriend.toBuilder() .flags(Flags.builder() - .partyName(applicant1LitigationFriend.getFullName()) - .roleOnCase("Claimant 1 Litigation Friend") - .details(flagDetails()) - .build()) + .partyName(applicant1LitigationFriend.getFullName()) + .roleOnCase("Claimant 1 Litigation Friend") + .details(flagDetails()) + .build()) .build(); return this; } @@ -6685,47 +6694,47 @@ public CaseDataBuilder withApplicant2Flags() { this.applicant2 = applicant2.toBuilder() .partyID("app-2-party-id") .flags(Flags.builder() - .partyName(applicant2.getPartyName()) - .roleOnCase("Claimant 2") - .details(flagDetails()) - .build()) + .partyName(applicant2.getPartyName()) + .roleOnCase("Claimant 2") + .details(flagDetails()) + .build()) .build(); return this; } public CaseDataBuilder withApplicant2WitnessFlags() { this.applicantWitnesses = wrapElements(PartyFlagStructure.builder() - .firstName("W first") - .lastName("W last") - .flags(Flags.builder() - .partyName("W First W Last") - .roleOnCase("Claimant 2 Witness") - .details(flagDetails()) - .build()) - .build()); + .firstName("W first") + .lastName("W last") + .flags(Flags.builder() + .partyName("W First W Last") + .roleOnCase("Claimant 2 Witness") + .details(flagDetails()) + .build()) + .build()); return this; } public CaseDataBuilder withApplicant2ExpertFlags() { this.applicantExperts = wrapElements(PartyFlagStructure.builder() - .firstName("E first") - .lastName("E last") - .flags(Flags.builder() - .partyName("E First E Last") - .roleOnCase("Claimant 2 Expert") - .details(flagDetails()) - .build()) - .build()); + .firstName("E first") + .lastName("E last") + .flags(Flags.builder() + .partyName("E First E Last") + .roleOnCase("Claimant 2 Expert") + .details(flagDetails()) + .build()) + .build()); return this; } public CaseDataBuilder withApplicant2LitigationFriendFlags() { this.applicant2LitigationFriend = applicant2LitigationFriend.toBuilder() .flags(Flags.builder() - .partyName(applicant2LitigationFriend.getFullName()) - .roleOnCase("Claimant 2 Litigation Friend") - .details(flagDetails()) - .build()) + .partyName(applicant2LitigationFriend.getFullName()) + .roleOnCase("Claimant 2 Litigation Friend") + .details(flagDetails()) + .build()) .build(); return this; } @@ -6738,10 +6747,10 @@ public CaseDataBuilder withRespondent1LitigationFriendFlags(List> flags) { this.respondent1 = respondent1.toBuilder() .partyID("res-1-party-id") .flags(Flags.builder() - .partyName(respondent1.getPartyName()) - .roleOnCase("Defendant 1") - .details(flags) - .build()) + .partyName(respondent1.getPartyName()) + .roleOnCase("Defendant 1") + .details(flags) + .build()) .build(); return this; } @@ -6769,10 +6778,10 @@ public CaseDataBuilder withRespondent1WitnessFlags() { .firstName("W first") .lastName("W last") .flags(Flags.builder() - .partyName("W First W Last") - .roleOnCase("Defendant 1 Witness") - .details(flagDetails()) - .build()) + .partyName("W First W Last") + .roleOnCase("Defendant 1 Witness") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6784,10 +6793,10 @@ public CaseDataBuilder withRespondent1ExpertFlags() { .firstName("E first") .lastName("E last") .flags(Flags.builder() - .partyName("E First E Last") - .roleOnCase("Defendant 1 Expert") - .details(flagDetails()) - .build()) + .partyName("E First E Last") + .roleOnCase("Defendant 1 Expert") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6796,47 +6805,47 @@ public CaseDataBuilder withRespondent2Flags() { this.respondent2 = respondent2.toBuilder() .partyID("res-2-party-id") .flags(Flags.builder() - .partyName(respondent2.getPartyName()) - .roleOnCase("Defendant 2") - .details(flagDetails()) - .build()) + .partyName(respondent2.getPartyName()) + .roleOnCase("Defendant 2") + .details(flagDetails()) + .build()) .build(); return this; } public CaseDataBuilder withRespondent2ExpertFlags() { this.respondent2Experts = wrapElements(PartyFlagStructure.builder() - .firstName("E first") - .lastName("E last") - .flags(Flags.builder() - .partyName("E First E Last") - .roleOnCase("Defendant 2 Expert") - .details(flagDetails()) - .build()) - .build()); + .firstName("E first") + .lastName("E last") + .flags(Flags.builder() + .partyName("E First E Last") + .roleOnCase("Defendant 2 Expert") + .details(flagDetails()) + .build()) + .build()); return this; } public CaseDataBuilder withRespondent2WitnessFlags() { this.respondent2Witnesses = wrapElements(PartyFlagStructure.builder() - .firstName("W first") - .lastName("W last") - .flags(Flags.builder() - .partyName("W First W Last") - .roleOnCase("Defendant 2 Witness") - .details(flagDetails()) - .build()) - .build()); + .firstName("W first") + .lastName("W last") + .flags(Flags.builder() + .partyName("W First W Last") + .roleOnCase("Defendant 2 Witness") + .details(flagDetails()) + .build()) + .build()); return this; } public CaseDataBuilder withRespondent2LitigationFriendFlags() { this.respondent2LitigationFriend = respondent2LitigationFriend.toBuilder() .flags(Flags.builder() - .partyName(respondent2LitigationFriend.getFullName()) - .roleOnCase("Defendant 2 Litigation Friend") - .details(flagDetails()) - .build()) + .partyName(respondent2LitigationFriend.getFullName()) + .roleOnCase("Defendant 2 Litigation Friend") + .details(flagDetails()) + .build()) .build(); return this; } @@ -6848,10 +6857,10 @@ public CaseDataBuilder withApplicant1LRIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("App 1 Lr Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("App 1 Lr Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6863,10 +6872,10 @@ public CaseDataBuilder withRespondent1LRIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("Res 1 Lr Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("Res 1 Lr Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6878,10 +6887,10 @@ public CaseDataBuilder withRespondent2LRIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("Res 2 Lr Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("Res 2 Lr Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6893,10 +6902,10 @@ public CaseDataBuilder withApplicant1OrgIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("App 1 Org Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("App 1 Org Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6908,10 +6917,10 @@ public CaseDataBuilder withApplicant2OrgIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("App 2 Org Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("App 2 Org Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6923,10 +6932,10 @@ public CaseDataBuilder withRespondent1OrgIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("Res 1 Org Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("Res 1 Org Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6938,10 +6947,10 @@ public CaseDataBuilder withRespondent2OrgIndividualFlags() { .firstName("First") .lastName("Last") .flags(Flags.builder() - .partyName("First Last") - .roleOnCase("Res 2 Org Individual") - .details(flagDetails()) - .build()) + .partyName("First Last") + .roleOnCase("Res 2 Org Individual") + .details(flagDetails()) + .build()) .build()); return this; } @@ -6953,8 +6962,8 @@ public List> flagDetails() { .flagCode("AB001") .hearingRelevant(YES) .status("Active") - .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) - .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) + .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) + .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) .build(); FlagDetail details2 = FlagDetail.builder() @@ -6963,8 +6972,8 @@ public List> flagDetails() { .flagCode("SM001") .hearingRelevant(YES) .status("Active") - .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) - .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) + .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) + .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) .build(); FlagDetail details3 = FlagDetail.builder() @@ -6973,8 +6982,8 @@ public List> flagDetails() { .flagCode("RA001") .hearingRelevant(NO) .status("Active") - .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) - .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) + .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) + .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) .build(); FlagDetail details4 = FlagDetail.builder() @@ -6983,8 +6992,8 @@ public List> flagDetails() { .flagCode("AB001") .hearingRelevant(YES) .status("Inactive") - .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) - .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) + .dateTimeCreated(LocalDateTime.of(2024, 1, 1, 9, 0, 0)) + .dateTimeModified(LocalDateTime.of(2024, 2, 1, 12, 0, 0)) .build(); return wrapElements(details1, details2, details3, details4); @@ -7066,7 +7075,8 @@ public CaseDataBuilder specDefenceFullAdmitted2Required(YesOrNo yesOrNo) { return this; } - public CaseDataBuilder defenceAdmitPartPaymentTimeRouteRequired(RespondentResponsePartAdmissionPaymentTimeLRspec respondentResponsePartAdmissionPaymentTimeLRspec) { + public CaseDataBuilder defenceAdmitPartPaymentTimeRouteRequired( + RespondentResponsePartAdmissionPaymentTimeLRspec respondentResponsePartAdmissionPaymentTimeLRspec) { this.defenceAdmitPartPaymentTimeRouteRequired = respondentResponsePartAdmissionPaymentTimeLRspec; return this; } @@ -7159,12 +7169,12 @@ public CaseDataBuilder atStatePastRespondToSettlementAgreementDeadline() { public CaseDataBuilder addApplicantLRIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("app-lr-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("app-lr-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.applicant1LRIndividuals != null && !this.applicant1LRIndividuals.isEmpty()) { this.applicant1LRIndividuals.addAll(individual); } else { @@ -7176,12 +7186,12 @@ public CaseDataBuilder addApplicantLRIndividual(String firstName, String lastNam public CaseDataBuilder addRespondent1LRIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("res-1-lr-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("res-1-lr-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.respondent1LRIndividuals != null && !this.respondent1LRIndividuals.isEmpty()) { this.respondent1LRIndividuals.addAll(individual); } else { @@ -7193,12 +7203,12 @@ public CaseDataBuilder addRespondent1LRIndividual(String firstName, String lastN public CaseDataBuilder addRespondent2LRIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("res-2-lr-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("res-2-lr-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.respondent2LRIndividuals != null && !this.respondent2LRIndividuals.isEmpty()) { this.respondent2LRIndividuals.addAll(individual); } else { @@ -7210,12 +7220,12 @@ public CaseDataBuilder addRespondent2LRIndividual(String firstName, String lastN public CaseDataBuilder addApplicant1OrgIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("app-1-org-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("app-1-org-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.applicant1OrgIndividuals != null && !this.applicant1OrgIndividuals.isEmpty()) { this.applicant1OrgIndividuals.addAll(individual); } else { @@ -7227,12 +7237,12 @@ public CaseDataBuilder addApplicant1OrgIndividual(String firstName, String lastN public CaseDataBuilder addApplicant2OrgIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("app-2-org-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("app-2-org-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.applicant2OrgIndividuals != null && !this.applicant2OrgIndividuals.isEmpty()) { this.applicant2OrgIndividuals.addAll(individual); } else { @@ -7244,12 +7254,12 @@ public CaseDataBuilder addApplicant2OrgIndividual(String firstName, String lastN public CaseDataBuilder addRespondent1OrgIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("res-1-org-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("res-1-org-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.respondent1OrgIndividuals != null && !this.respondent1OrgIndividuals.isEmpty()) { this.respondent1OrgIndividuals.addAll(individual); } else { @@ -7261,12 +7271,12 @@ public CaseDataBuilder addRespondent1OrgIndividual(String firstName, String last public CaseDataBuilder addRespondent2OrgIndividual(String firstName, String lastName) { List> individual = wrapElements(PartyFlagStructure.builder() - .partyID("res-2-org-ind-party-id") - .firstName(firstName) - .lastName(lastName) - .email("abc@def.ghi") - .phone("07777777777") - .build()); + .partyID("res-2-org-ind-party-id") + .firstName(firstName) + .lastName(lastName) + .email("abc@def.ghi") + .phone("07777777777") + .build()); if (this.respondent2OrgIndividuals != null && !this.respondent2OrgIndividuals.isEmpty()) { this.respondent2OrgIndividuals.addAll(individual); } else { @@ -7280,54 +7290,54 @@ public CaseDataBuilder addLiPApplicant1MediationInfo(boolean alternateInfo) { if (this.caseDataLiP != null) { this.caseDataLiP = this.caseDataLiP.toBuilder() .applicant1LiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(NO) - .alternativeMediationContactPerson("Alt contact person") - .isMediationEmailCorrect(NO) - .alternativeMediationEmail("altemail@mediation.com") - .isMediationPhoneCorrect(NO) - .alternativeMediationTelephone("07222222222") - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()).build(); + .isMediationContactNameCorrect(NO) + .alternativeMediationContactPerson("Alt contact person") + .isMediationEmailCorrect(NO) + .alternativeMediationEmail("altemail@mediation.com") + .isMediationPhoneCorrect(NO) + .alternativeMediationTelephone("07222222222") + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()).build(); } else { this.caseDataLiP = CaseDataLiP.builder() .applicant1LiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(NO) - .alternativeMediationContactPerson("Alt contact person") - .isMediationEmailCorrect(NO) - .alternativeMediationEmail("altemail@mediation.com") - .isMediationPhoneCorrect(NO) - .alternativeMediationTelephone("07222222222") - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()).build(); + .isMediationContactNameCorrect(NO) + .alternativeMediationContactPerson("Alt contact person") + .isMediationEmailCorrect(NO) + .alternativeMediationEmail("altemail@mediation.com") + .isMediationPhoneCorrect(NO) + .alternativeMediationTelephone("07222222222") + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()).build(); } } else { if (this.caseDataLiP != null) { this.caseDataLiP = this.caseDataLiP.toBuilder() .applicant1LiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(YES) - .isMediationEmailCorrect(YES) - .isMediationPhoneCorrect(YES) - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()) + .isMediationContactNameCorrect(YES) + .isMediationEmailCorrect(YES) + .isMediationPhoneCorrect(YES) + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()) .applicant1AdditionalLipPartyDetails(AdditionalLipPartyDetails.builder() - .contactPerson("Lip contact person") - .build()) + .contactPerson("Lip contact person") + .build()) .build(); } else { this.caseDataLiP = CaseDataLiP.builder() .applicant1LiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(YES) - .isMediationEmailCorrect(YES) - .isMediationPhoneCorrect(YES) - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()) + .isMediationContactNameCorrect(YES) + .isMediationEmailCorrect(YES) + .isMediationPhoneCorrect(YES) + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()) .applicant1AdditionalLipPartyDetails(AdditionalLipPartyDetails.builder() - .contactPerson("Lip contact person") - .build()) + .contactPerson("Lip contact person") + .build()) .build(); } } @@ -7339,54 +7349,54 @@ public CaseDataBuilder addLiPRespondent1MediationInfo(boolean alternateInfo) { if (this.caseDataLiP != null) { this.caseDataLiP = this.caseDataLiP.toBuilder() .respondent1MediationLiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(NO) - .alternativeMediationContactPerson("Alt contact person") - .isMediationEmailCorrect(NO) - .alternativeMediationEmail("altemail@mediation.com") - .isMediationPhoneCorrect(NO) - .alternativeMediationTelephone("07222222222") - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()).build(); + .isMediationContactNameCorrect(NO) + .alternativeMediationContactPerson("Alt contact person") + .isMediationEmailCorrect(NO) + .alternativeMediationEmail("altemail@mediation.com") + .isMediationPhoneCorrect(NO) + .alternativeMediationTelephone("07222222222") + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()).build(); } else { this.caseDataLiP = CaseDataLiP.builder() .respondent1MediationLiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(NO) - .alternativeMediationContactPerson("Alt contact person") - .isMediationEmailCorrect(NO) - .alternativeMediationEmail("altemail@mediation.com") - .isMediationPhoneCorrect(NO) - .alternativeMediationTelephone("07222222222") - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()).build(); + .isMediationContactNameCorrect(NO) + .alternativeMediationContactPerson("Alt contact person") + .isMediationEmailCorrect(NO) + .alternativeMediationEmail("altemail@mediation.com") + .isMediationPhoneCorrect(NO) + .alternativeMediationTelephone("07222222222") + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()).build(); } } else { if (this.caseDataLiP != null) { this.caseDataLiP = this.caseDataLiP.toBuilder() .respondent1MediationLiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(YES) - .isMediationEmailCorrect(YES) - .isMediationPhoneCorrect(YES) - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()) + .isMediationContactNameCorrect(YES) + .isMediationEmailCorrect(YES) + .isMediationPhoneCorrect(YES) + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()) .respondent1LiPResponse(RespondentLiPResponse.builder() - .respondent1LiPContactPerson("Lip contact person") - .build()) + .respondent1LiPContactPerson("Lip contact person") + .build()) .build(); } else { this.caseDataLiP = CaseDataLiP.builder() .respondent1MediationLiPResponseCarm(MediationLiPCarm.builder() - .isMediationContactNameCorrect(YES) - .isMediationEmailCorrect(YES) - .isMediationPhoneCorrect(YES) - .hasUnavailabilityNextThreeMonths(YES) - .unavailableDatesForMediation(getMediationUnavailableDates()) - .build()) + .isMediationContactNameCorrect(YES) + .isMediationEmailCorrect(YES) + .isMediationPhoneCorrect(YES) + .hasUnavailabilityNextThreeMonths(YES) + .unavailableDatesForMediation(getMediationUnavailableDates()) + .build()) .respondent1LiPResponse(RespondentLiPResponse.builder() - .respondent1LiPContactPerson("Lip contact person") - .build()) + .respondent1LiPContactPerson("Lip contact person") + .build()) .build(); } } @@ -7452,23 +7462,23 @@ public CaseDataBuilder addRespondent2MediationAvailability() { private List> getMediationUnavailableDates() { return wrapElements(List.of( - UnavailableDate.builder() - .unavailableDateType(SINGLE_DATE) - .date(LocalDate.of(2024, 6, 1)) - .build(), - UnavailableDate.builder() - .unavailableDateType(SINGLE_DATE) - .date(LocalDate.of(2024, 6, 7)) - .build(), - UnavailableDate.builder() - .unavailableDateType(DATE_RANGE) - .fromDate(LocalDate.of(2024, 6, 10)) - .toDate(LocalDate.of(2024, 6, 15)) - .build(), - UnavailableDate.builder() - .unavailableDateType(DATE_RANGE) - .fromDate(LocalDate.of(2024, 6, 20)) - .toDate(LocalDate.of(2024, 6, 25)).build())); + UnavailableDate.builder() + .unavailableDateType(SINGLE_DATE) + .date(LocalDate.of(2024, 6, 1)) + .build(), + UnavailableDate.builder() + .unavailableDateType(SINGLE_DATE) + .date(LocalDate.of(2024, 6, 7)) + .build(), + UnavailableDate.builder() + .unavailableDateType(DATE_RANGE) + .fromDate(LocalDate.of(2024, 6, 10)) + .toDate(LocalDate.of(2024, 6, 15)) + .build(), + UnavailableDate.builder() + .unavailableDateType(DATE_RANGE) + .fromDate(LocalDate.of(2024, 6, 20)) + .toDate(LocalDate.of(2024, 6, 25)).build())); } public CaseDataBuilder applicant1RequestedPaymentDateForDefendantSpec(PaymentBySetDate repaymentBySetDate) { @@ -7520,10 +7530,10 @@ public CaseDataBuilder uploadMediationDocumentsChooseOptions(String partyChosen, } this.uploadDocumentsForm = UploadMediationDocumentsForm.builder() .uploadMediationDocumentsPartyChosen(DynamicList.builder() - .value(DynamicListElement.builder() - .code(partyChosen) - .build()) - .build()) + .value(DynamicListElement.builder() + .code(partyChosen) + .build()) + .build()) .mediationDocumentsType(documentTypes) .documentsReferredForm(documentsReferred) .nonAttendanceStatementForm(mediationNonAttendanceStatement) @@ -7533,24 +7543,24 @@ public CaseDataBuilder uploadMediationDocumentsChooseOptions(String partyChosen, public List> buildMediationNonAttendanceStatement() { return wrapElements(MediationNonAttendanceStatement.builder() - .yourName("My name") - .document(Document.builder() - .documentFileName("Mediation non attendance") - .build()) - .documentDate(LocalDate.of(2023, 4, 2)) - .documentUploadedDatetime(LocalDateTime.of(2023, 1, 1, 1, 1, 1)) - .build()); + .yourName("My name") + .document(Document.builder() + .documentFileName("Mediation non attendance") + .build()) + .documentDate(LocalDate.of(2023, 4, 2)) + .documentUploadedDatetime(LocalDateTime.of(2023, 1, 1, 1, 1, 1)) + .build()); } private List> buildMediationDocumentsReferred() { return wrapElements(MediationDocumentsReferredInStatement.builder() - .documentType("type") - .document(Document.builder() - .documentFileName("Referred documents") - .build()) - .documentDate(LocalDate.of(2023, 4, 2)) - .documentUploadedDatetime(LocalDateTime.of(2023, 1, 1, 1, 1, 1)) - .build()); + .documentType("type") + .document(Document.builder() + .documentFileName("Referred documents") + .build()) + .documentDate(LocalDate.of(2023, 4, 2)) + .documentUploadedDatetime(LocalDateTime.of(2023, 1, 1, 1, 1, 1)) + .build()); } public CaseDataBuilder atStateRespondent1v1BilingualFlagSet() { @@ -7826,9 +7836,9 @@ public CaseData build() { .disposalHearingFinalDisposalHearingTimeDJ(disposalHearingFinalDisposalHearingTimeDJ) .trialHearingTimeDJ(trialHearingTimeDJ) .trialOrderMadeWithoutHearingDJ(trialOrderMadeWithoutHearingDJ) - //Certificate of Service - .cosNotifyClaimDetails1(cosNotifyClaimDetails1) - .cosNotifyClaimDetails2(cosNotifyClaimDetails2) + //Certificate of Service + .cosNotifyClaimDetails1(cosNotifyClaimDetails1) + .cosNotifyClaimDetails2(cosNotifyClaimDetails2) .ccjPaymentDetails(ccjPaymentDetails) .totalInterest(totalInterest) .applicant1AcceptAdmitAmountPaidSpec(applicant1AcceptAdmitAmountPaidSpec) diff --git a/src/test/java/uk/gov/hmcts/reform/civil/service/PaymentsServiceTest.java b/src/test/java/uk/gov/hmcts/reform/civil/service/PaymentsServiceTest.java index 6465614a3f7..c244925d0c9 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/service/PaymentsServiceTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/service/PaymentsServiceTest.java @@ -46,7 +46,6 @@ class PaymentsServiceTest { private static final String SERVICE = "service"; private static final String SITE_ID = "site_id"; - private static final String SPEC_SERVICE = "spec_service"; private static final String SPEC_SITE_ID = "spec_site_id"; private static final String AUTH_TOKEN = "Bearer token"; private static final PBAServiceRequestResponse PAYMENT_DTO = PBAServiceRequestResponse.builder()