From 39bd2286b751fed18660b2dc472197e6ca15a346 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:26:06 +0000 Subject: [PATCH 1/2] Bump ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3 in /common Bumps ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3 from 8.0.0 to 8.4.0. --- updated-dependencies: - dependency-name: ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3 dependency-version: 8.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- common/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/build.gradle b/common/build.gradle index 134d281f0..2a5465f84 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -18,7 +18,7 @@ repositories { } dependencies { - api 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:8.0.0' + api 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:8.4.0' api 'org.springframework.boot:spring-boot-starter-jdbc' api 'org.springframework.boot:spring-boot-starter-actuator' api 'org.springframework.boot:spring-boot-starter-web' From bd57174e57b4555b674ed6118cad4171e018696f Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 8 Sep 2026 16:05:43 +0100 Subject: [PATCH 2/2] fixing integration tests --- .../service/SkeletonProcessingService.java | 15 +++++++++++- .../SkeletonProcessingServiceTests.java | 24 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/service/SkeletonProcessingService.java b/gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/service/SkeletonProcessingService.java index deabc99d7..bb74a0481 100644 --- a/gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/service/SkeletonProcessingService.java +++ b/gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/service/SkeletonProcessingService.java @@ -72,7 +72,20 @@ private String normalizeSkeletonXml(String skeletonFileAsString) { } private boolean isEntireRcmrSkeleton(String normalizedSkeleton) { - return normalizedSkeleton != null && normalizedSkeleton.startsWith("")); } @@ -197,7 +209,14 @@ void When_NormalizeSkeletonXmlCalledWithXmlDeclaration_Expect_StripsDeclarationB var isRcmrMethod = SkeletonProcessingService.class.getDeclaredMethod("isEntireRcmrSkeleton", String.class); isRcmrMethod.setAccessible(true); + var document = org.mockito.Mockito.mock(Document.class); + var rootElement = org.mockito.Mockito.mock(Element.class); var xmlWithDeclaration = "\n"; + + when(xPathService.parseDocumentFromXml(any())).thenReturn(document); + when(document.getDocumentElement()).thenReturn(rootElement); + when(rootElement.getLocalName()).thenReturn("RCMR_IN030000UK06"); + var normalized = (String) normalizeMethod.invoke(skeletonProcessingService, xmlWithDeclaration); assertTrue(normalized.startsWith("