From faed7dfb5a7257299b7055de5baf585cde7ce516 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Wed, 16 Oct 2024 13:50:52 +0100 Subject: [PATCH] SSCSCI-1128 (#1652) SSCSCI-1128: Fix name of util function so it doesn't override lombok getter Co-authored-by: Tom Elliott --- .../java/uk/gov/hmcts/reform/sscs/ccd/domain/Address.java | 2 +- .../java/uk/gov/hmcts/reform/sscs/ccd/domain/AddressTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/domain/Address.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/domain/Address.java index ad908f3147..8dd4ada650 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/domain/Address.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/domain/Address.java @@ -124,7 +124,7 @@ public boolean isAddressEmpty() { } @JsonIgnore - public UkPortOfEntry getPortOfEntry() { + public UkPortOfEntry getUkPortOfEntry() { return Arrays.stream(UkPortOfEntry.values()) .filter(port -> port.getLocationCode().equalsIgnoreCase(this.portOfEntry)) .findFirst() diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/domain/AddressTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/domain/AddressTest.java index 0bffb49ea1..1fe8258d2c 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/domain/AddressTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/domain/AddressTest.java @@ -143,7 +143,7 @@ public void getPortOfEntry_returns_correct_portOfEntry_for_valid_locationCode(Uk .country("USA") .isInUk(NO) .build(); - assertEquals(port, address.getPortOfEntry()); + assertEquals(port, address.getUkPortOfEntry()); } @Test @@ -156,6 +156,6 @@ public void getPortOfEntry_returns_null_for_invalid_locationCode() { .country("USA") .isInUk(NO) .build(); - assertNull(address.getPortOfEntry()); + assertNull(address.getUkPortOfEntry()); } }