diff --git a/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandler.java b/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandler.java index 701d9c1c912..df862ffbf82 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandler.java @@ -1363,9 +1363,9 @@ private CallbackResponse setApplicantResponseDeadline(CallbackParams callbackPar AllocatedTrack allocatedTrack = caseData.getAllocatedTrack(); Party updatedRespondent1; - if (NO.equals(caseData.getTempAddress1Required())) { + if (NO.equals(caseData.getTempCorrespondenceAddress1Required())) { updatedRespondent1 = caseData.getRespondent1().toBuilder() - .primaryAddress(caseData.getTempAddress1()).build(); + .primaryAddress(caseData.getTempCorrespondenceAddress1()).build(); } else { updatedRespondent1 = caseData.getRespondent1().toBuilder() .primaryAddress(caseData.getRespondent1Copy().getPrimaryAddress()) @@ -1578,9 +1578,9 @@ && isAwaitingAnotherDefendantResponse(caseData)) { private static Party applyRespondent2Address(CaseData caseData, CaseData.CaseDataBuilder updatedData) { Party updatedRespondent2; - if (NO.equals(caseData.getTempAddress2Required())) { + if (NO.equals(caseData.getTempCorrespondenceAddress2Required())) { updatedRespondent2 = caseData.getRespondent2().toBuilder() - .primaryAddress(caseData.getTempAddress2()).build(); + .primaryAddress(caseData.getTempCorrespondenceAddress2()).build(); } else { updatedRespondent2 = caseData.getRespondent2().toBuilder() .primaryAddress(caseData.getRespondent2Copy().getPrimaryAddress()).build(); diff --git a/src/main/java/uk/gov/hmcts/reform/civil/model/CaseDataParent.java b/src/main/java/uk/gov/hmcts/reform/civil/model/CaseDataParent.java index 08b9556caf8..5db7728550f 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/model/CaseDataParent.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/model/CaseDataParent.java @@ -726,19 +726,19 @@ public boolean isApplicantNotRepresented() { /** * used to temporary hold addresses. */ - private final Address tempAddress1; + private final Address tempCorrespondenceAddress1; /** - * used with tempAddress1. + * used with tempCorrespondenceAddress1. */ - private final YesOrNo tempAddress1Required; + private final YesOrNo tempCorrespondenceAddress1Required; /** * used to temporary hold addresses. */ - private final Address tempAddress2; + private final Address tempCorrespondenceAddress2; /** - * used with tempAddress1. + * used with tempCorrespondenceAddress2. */ - private final YesOrNo tempAddress2Required; + private final YesOrNo tempCorrespondenceAddress2Required; @JsonIgnore public boolean isResponseAcceptedByClaimant() { diff --git a/src/test/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandlerTest.java index 1ae04095de2..73040deeb42 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/handler/callback/user/RespondToClaimSpecCallbackHandlerTest.java @@ -789,8 +789,8 @@ void updateRespondent1AddressWhenUpdated() { .respondent1(PartyBuilder.builder().individual().build()) .atStateApplicantRespondToDefenceAndProceed() .build().toBuilder() - .tempAddress1Required(NO) - .tempAddress1(AddressBuilder.maximal().build()) + .tempCorrespondenceAddress1Required(NO) + .tempCorrespondenceAddress1(AddressBuilder.maximal().build()) .build(); CallbackParams params = callbackParamsOf(caseData, ABOUT_TO_SUBMIT); @@ -829,11 +829,11 @@ void updateRespondent2AddressWhenUpdated() { .respondent2(PartyBuilder.builder().individual().build()) .respondent2Copy(PartyBuilder.builder().individual().build()) .build().toBuilder() - .tempAddress1Required(YES) - .tempAddress1(Address.builder().build()) + .tempCorrespondenceAddress1Required(YES) + .tempCorrespondenceAddress1(Address.builder().build()) .build().toBuilder() - .tempAddress2Required(NO) - .tempAddress2(newAddress2) + .tempCorrespondenceAddress2Required(NO) + .tempCorrespondenceAddress2(newAddress2) .respondentSolicitor2ServiceAddressRequired(NO) .respondentSolicitor2ServiceAddress(newAddress2) .build(); @@ -906,12 +906,12 @@ void defendantResponsePopulatesWitnessesData() { .respondent1DQWitnessesSmallClaim(res1witnesses) .respondent2DQWitnessesSmallClaim(res2witnesses) .build().toBuilder() - .tempAddress1Required(YES) - .tempAddress1(Address.builder().build()) + .tempCorrespondenceAddress1Required(YES) + .tempCorrespondenceAddress1(Address.builder().build()) .respondent2ResponseDate(dateTime) .respondent1ResponseDate(dateTime).build().toBuilder() - .tempAddress2Required(NO) - .tempAddress2(AddressBuilder.maximal().build()) + .tempCorrespondenceAddress2Required(NO) + .tempCorrespondenceAddress2(AddressBuilder.maximal().build()) .build(); CallbackParams params = callbackParamsOf(caseData, ABOUT_TO_SUBMIT); @@ -1729,7 +1729,7 @@ void shouldUpdateCorrespondence1_whenProvided1v2ss_withSameResponse_withv2copyAn .build()) .respondent2Copy(PartyBuilder.builder().individual().build()) .respondent2SameLegalRepresentative(YES) - .tempAddress2Required(NO) + .tempCorrespondenceAddress2Required(NO) .build(); CallbackParams params = callbackParamsOf(caseData, ABOUT_TO_SUBMIT);