Skip to content

Commit 0fec230

Browse files
authored
Merge branch 'main' into dependabot/gradle/mock-mhs-adaptor/org.apache.qpid-qpid-jms-client-2.9.0
2 parents c1642f3 + 251cdd2 commit 0fec230

File tree

78 files changed

+527
-527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+527
-527
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
config:
10-
- folder: service
10+
- folder: docker/service
1111
dockerhub_name: nia-gp2gp-adaptor
1212
upload_url: ${{ github.event.release.upload_url }}
1313
uses: NHSDigital/integration-adaptor-actions/.github/workflows/release-adaptor-container-image.yml@main

e2e-tests/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id "io.freefair.lombok" version "8.14.2"
3+
id "io.freefair.lombok" version "9.0.0"
44
}
55

66
apply plugin: 'java'
@@ -22,10 +22,10 @@ dependencies {
2222
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0'
2323
testImplementation 'commons-io:commons-io:2.20.0'
2424
testImplementation 'org.awaitility:awaitility:4.3.0'
25-
testImplementation "org.assertj:assertj-core:3.27.5"
25+
testImplementation "org.assertj:assertj-core:3.27.6"
2626
testImplementation 'ch.qos.logback:logback-classic:1.5.18'
2727
testImplementation 'org.xmlunit:xmlunit-assertj3:2.10.4'
28-
testImplementation 'org.apache.httpcomponents.client5:httpclient5:5.5'
28+
testImplementation 'org.apache.httpcomponents.client5:httpclient5:5.5.1'
2929

3030
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
3131
}

e2e-tests/src/test/java/uk/nhs/adaptors/gp2gp/e2e/EhrExtractTest.java

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

mock-mhs-adaptor/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'org.springframework.boot' version '3.5.6'
33
id 'io.spring.dependency-management' version '1.1.7'
44
id 'java'
5-
id "io.freefair.lombok" version "8.14.2"
5+
id "io.freefair.lombok" version "9.0.0"
66
}
77

88
apply plugin: 'java'

service/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
id "com.github.spotbugs" version "6.4.2"
77
id "io.freefair.lombok" version "8.14.2"
88
id 'jacoco'
9-
id 'org.sonarqube' version '6.2.0.5505'
9+
id 'org.sonarqube' version '6.3.1.5724'
1010

1111
// Mutation testing
1212
id 'info.solidsoft.pitest' version '1.15.0'
@@ -61,15 +61,15 @@ dependencies {
6161
implementation 'org.springframework.boot:spring-boot-starter-logging'
6262

6363
// Infrastructure
64-
implementation 'software.amazon.awssdk:s3:2.33.9'
65-
implementation ('com.azure:azure-storage-blob:12.30.0')
66-
implementation 'org.apache.qpid:qpid-jms-client:2.8.0'
64+
implementation 'software.amazon.awssdk:s3:2.34.0'
65+
implementation ('com.azure:azure-storage-blob:12.31.3')
66+
implementation 'org.apache.qpid:qpid-jms-client:2.9.0'
6767

6868
// Utils
69-
implementation 'org.apache.commons:commons-lang3:3.18.0'
69+
implementation 'org.apache.commons:commons-lang3:3.19.0'
7070
implementation 'javax.xml.soap:javax.xml.soap-api:1.4.0'
7171
implementation 'com.github.spullara.mustache.java:compiler:0.9.14'
72-
implementation 'org.apache.tika:tika-core:3.2.0'
72+
implementation 'org.apache.tika:tika-core:3.2.3'
7373

7474
// Fhir
7575
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:7.6.1'

service/src/test/java/uk/nhs/adaptors/gp2gp/common/configuration/ObjectMapperBeanTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
import static org.assertj.core.api.Assertions.assertThat;
88

9-
public class ObjectMapperBeanTest {
9+
class ObjectMapperBeanTest {
1010

1111
@Test
12-
public void createsObjectMapperWithUnlimitedStringLengthConstraint() {
12+
void createsObjectMapperWithUnlimitedStringLengthConstraint() {
1313
// The way we use JSON to store serialized XML and base64 encoded attachments means that the size of individual
1414
// strings can get very large. We've set the max string size below to be 2GB.
1515
// Ideal solution would be to avoid using JSON to store very large strings of data in the first place,

service/src/test/java/uk/nhs/adaptors/gp2gp/common/configuration/RedactionsContextTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import static uk.nhs.adaptors.gp2gp.common.configuration.RedactionsContext.NON_REDACTION_INTERACTION_ID;
1010
import static uk.nhs.adaptors.gp2gp.common.configuration.RedactionsContext.REDACTION_INTERACTION_ID;
1111

12-
public class RedactionsContextTest {
12+
class RedactionsContextTest {
1313

1414
@Test
15-
public void When_IsRedactionMessageAndInteractionIdIsRCMRIN030000UK07_Expect_IsRedactionMessage() {
15+
void When_IsRedactionMessageAndInteractionIdIsRCMRIN030000UK07_Expect_IsRedactionMessage() {
1616
final var redactionsContext = new RedactionsContext(REDACTION_INTERACTION_ID);
1717

1818
final var isRedactionMessage = redactionsContext.isRedactionMessage();
@@ -23,7 +23,7 @@ public void When_IsRedactionMessageAndInteractionIdIsRCMRIN030000UK07_Expect_IsR
2323
@ParameterizedTest
2424
@ValueSource(strings = { NON_REDACTION_INTERACTION_ID })
2525
@NullAndEmptySource
26-
public void When_IsRedactionMessageAndInteractionIdIsNotRCMRIN030000UK07_Expect_IsNotRedactionMessage(
26+
void When_IsRedactionMessageAndInteractionIdIsNotRCMRIN030000UK07_Expect_IsNotRedactionMessage(
2727
String interactionId
2828
) {
2929
final var redactionsContext = new RedactionsContext(interactionId);

service/src/test/java/uk/nhs/adaptors/gp2gp/common/service/ConfidentialityServiceTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import static uk.nhs.adaptors.gp2gp.common.configuration.RedactionsContext.REDACTION_INTERACTION_ID;
2424

2525
@ExtendWith(MockitoExtension.class)
26-
public class ConfidentialityServiceTest {
26+
class ConfidentialityServiceTest {
2727
private static final Meta META_WITH_NO_SECURITY = new Meta();
2828
private static final Meta META_WITH_NOPAT_SECURITY = new Meta()
2929
.addSecurity(
@@ -49,7 +49,7 @@ private static Stream<Arguments> When_GenerateAndIsNotRedactionMessage_Expect_Em
4949
@ParameterizedTest
5050
@MethodSource
5151
@NullSource
52-
public void When_GenerateAndIsNotRedactionMessage_Expect_EmptyOptional(Meta meta) {
52+
void When_GenerateAndIsNotRedactionMessage_Expect_EmptyOptional(Meta meta) {
5353
var confidentialityService = new ConfidentialityService(
5454
new RedactionsContext(NON_REDACTION_INTERACTION_ID)
5555
);
@@ -62,7 +62,7 @@ public void When_GenerateAndIsNotRedactionMessage_Expect_EmptyOptional(Meta meta
6262
}
6363

6464
@Test
65-
public void When_GenerateAndIsRedactionMessageAndNoMetaSecurityIsPresent_Expect_EmptyOptional() {
65+
void When_GenerateAndIsRedactionMessageAndNoMetaSecurityIsPresent_Expect_EmptyOptional() {
6666
var confidentialityService = new ConfidentialityService(
6767
new RedactionsContext(REDACTION_INTERACTION_ID)
6868
);
@@ -75,7 +75,7 @@ public void When_GenerateAndIsRedactionMessageAndNoMetaSecurityIsPresent_Expect_
7575
}
7676

7777
@Test
78-
public void When_GenerateAndIsRedactionMessageAndNonNOPATMetaSecurityIsPresent_Expect_EmptyOptional() {
78+
void When_GenerateAndIsRedactionMessageAndNonNOPATMetaSecurityIsPresent_Expect_EmptyOptional() {
7979
var confidentialityService = new ConfidentialityService(
8080
new RedactionsContext(REDACTION_INTERACTION_ID)
8181
);
@@ -88,7 +88,7 @@ public void When_GenerateAndIsRedactionMessageAndNonNOPATMetaSecurityIsPresent_E
8888
}
8989

9090
@Test
91-
public void When_GenerateAndIsRedactionMessageAndNOPATMetaSecurityIsPresent_Expect_ConfidentialityCode() {
91+
void When_GenerateAndIsRedactionMessageAndNOPATMetaSecurityIsPresent_Expect_ConfidentialityCode() {
9292
var confidentialityService = new ConfidentialityService(
9393
new RedactionsContext(REDACTION_INTERACTION_ID)
9494
);

service/src/test/java/uk/nhs/adaptors/gp2gp/common/service/ProcessFailureHandlingServiceTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import static org.mockito.Mockito.verifyNoInteractions;
2222

2323
@ExtendWith(MockitoExtension.class)
24-
public class ProcessFailureHandlingServiceTest {
24+
class ProcessFailureHandlingServiceTest {
2525

2626
@Mock
2727
private EhrExtractStatusRepository ehrExtractStatusRepository;
@@ -42,7 +42,7 @@ public class ProcessFailureHandlingServiceTest {
4242
private ProcessFailureHandlingService processFailureHandlingService;
4343

4444
@Test
45-
public void When_EhrExtractStatusExistsInDB_Expect_FailProcessToReturnTrue() {
45+
void When_EhrExtractStatusExistsInDB_Expect_FailProcessToReturnTrue() {
4646
var conversationId = "conversationId1";
4747
var errorCode = "errorCode1";
4848
var errorMessage = "errorMessage1";
@@ -59,7 +59,7 @@ public void When_EhrExtractStatusExistsInDB_Expect_FailProcessToReturnTrue() {
5959
}
6060

6161
@Test
62-
public void When_EhrExtractStatusNotInDB_Expect_FailProcessToReturnFalse() {
62+
void When_EhrExtractStatusNotInDB_Expect_FailProcessToReturnFalse() {
6363
doReturn(Optional.empty()).when(ehrExtractStatusRepository).findByConversationId(any());
6464

6565
var result = processFailureHandlingService.failProcess("convId1", "errorCode1", "errorMsg1", "taskType1");
@@ -69,7 +69,7 @@ public void When_EhrExtractStatusNotInDB_Expect_FailProcessToReturnFalse() {
6969
}
7070

7171
@Test
72-
public void When_ExceptionIsThrown_Expect_FailProcessToReturnFalse() {
72+
void When_ExceptionIsThrown_Expect_FailProcessToReturnFalse() {
7373
doThrow(new RuntimeException("test exception")).when(ehrExtractStatusRepository).findByConversationId(any());
7474

7575
var result = processFailureHandlingService.failProcess("convId1", "errorCode1", "errorMsg1", "taskType1");
@@ -78,7 +78,7 @@ public void When_ExceptionIsThrown_Expect_FailProcessToReturnFalse() {
7878
}
7979

8080
@Test
81-
public void When_EhrExtractStatusNotInDB_Expect_HasProcessFailedToReturnFalse() {
81+
void When_EhrExtractStatusNotInDB_Expect_HasProcessFailedToReturnFalse() {
8282
doReturn(Optional.of(ehrExtractStatus)).when(ehrExtractStatusRepository).findByConversationId(any());
8383

8484
var result = processFailureHandlingService.hasProcessFailed("conversationId1");
@@ -87,7 +87,7 @@ public void When_EhrExtractStatusNotInDB_Expect_HasProcessFailedToReturnFalse()
8787
}
8888

8989
@Test
90-
public void When_ErrorInEhrExtractStatusIsMissing_Expect_HasProcessFailedToReturnFalse() {
90+
void When_ErrorInEhrExtractStatusIsMissing_Expect_HasProcessFailedToReturnFalse() {
9191
doReturn(null).when(ehrExtractStatus).getError();
9292
doReturn(Optional.of(ehrExtractStatus)).when(ehrExtractStatusRepository).findByConversationId(any());
9393

@@ -97,7 +97,7 @@ public void When_ErrorInEhrExtractStatusIsMissing_Expect_HasProcessFailedToRetur
9797
}
9898

9999
@Test
100-
public void When_ErrorInEhrExtractStatusIsPresent_Expect_HasProcessFailedToReturnTrue() {
100+
void When_ErrorInEhrExtractStatusIsPresent_Expect_HasProcessFailedToReturnTrue() {
101101
doReturn(ehrExtractStatusError).when(ehrExtractStatus).getError();
102102
doReturn(Optional.of(ehrExtractStatus)).when(ehrExtractStatusRepository).findByConversationId(any());
103103

@@ -107,7 +107,7 @@ public void When_ErrorInEhrExtractStatusIsPresent_Expect_HasProcessFailedToRetur
107107
}
108108

109109
@Test
110-
public void When_EhrExtractStatusRepositoryFails_Expect_HasProcessFailedToThrowException() {
110+
void When_EhrExtractStatusRepositoryFails_Expect_HasProcessFailedToThrowException() {
111111
var expectedException = new RuntimeException("test exception");
112112
doThrow(expectedException).when(ehrExtractStatusRepository).findByConversationId(any());
113113

service/src/test/java/uk/nhs/adaptors/gp2gp/common/service/RandomIdGeneratorServiceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
import org.junit.jupiter.api.Test;
99

10-
public class RandomIdGeneratorServiceTest {
10+
class RandomIdGeneratorServiceTest {
1111

1212
private static final String UUID_UPPERCASE_REGEXP = "[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}";
1313

1414
@Test
15-
public void When_CreatingNewId_Expect_GeneratedIdIsRandomUUID() {
15+
void When_CreatingNewId_Expect_GeneratedIdIsRandomUUID() {
1616
String id1 = new RandomIdGeneratorService().createNewId();
1717
String id2 = new RandomIdGeneratorService().createNewId();
1818

@@ -24,7 +24,7 @@ public void When_CreatingNewId_Expect_GeneratedIdIsRandomUUID() {
2424
}
2525

2626
@Test
27-
public void When_GeneratingIdFromExistingId_And_IdIsAValidUUID_Expect_ThatUUIDIsUsed() {
27+
void When_GeneratingIdFromExistingId_And_IdIsAValidUUID_Expect_ThatUUIDIsUsed() {
2828
var uuidString = UUID.randomUUID().toString();
2929

3030
var generatedUUID = new RandomIdGeneratorService().createNewOrUseExistingUUID(uuidString);
@@ -33,7 +33,7 @@ public void When_GeneratingIdFromExistingId_And_IdIsAValidUUID_Expect_ThatUUIDIs
3333
}
3434

3535
@Test
36-
public void When_GeneratingIdFromExistingId_And_IdIsNotAValidUUID_Expect_NewUUIDIsGenerated() {
36+
void When_GeneratingIdFromExistingId_And_IdIsNotAValidUUID_Expect_NewUUIDIsGenerated() {
3737
var idString = "THIS-IS-NOT-A-VALID-GUID";
3838

3939
var generatedUUID = new RandomIdGeneratorService().createNewOrUseExistingUUID(idString);

0 commit comments

Comments
 (0)