Skip to content

Commit 7cd7396

Browse files
Made checkstyle happy
1 parent 26035c2 commit 7cd7396

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/AgentPersonMapperTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package uk.nhs.adaptors.gp2gp.ehr.mapper;
22

3-
import static org.mockito.Mockito.when;
43
import static org.assertj.core.api.Assertions.assertThat;
54
import java.util.stream.Stream;
65

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/DocumentReferenceToNarrativeStatementMapperTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import uk.nhs.adaptors.gp2gp.utils.ConfidentialityCodeUtility;
2222
import uk.nhs.adaptors.gp2gp.utils.ResourceTestFileUtils;
2323

24-
import java.time.Instant;
2524
import java.util.stream.Stream;
2625

2726
import static org.assertj.core.api.Assertions.assertThat;
@@ -222,7 +221,7 @@ void When_MappingDocReferenceJson_Expect_NarrativeStatementXmlOutput(String inpu
222221

223222
@ParameterizedTest
224223
@MethodSource("documentReferenceResourceFileParamsWhenIdNeeded")
225-
void When_MappingDocReferenceJson_Expect_NarrativeStatementXmlOutput_WithIdNeeded(String inputJson, String outputXml) {
224+
void When_MappingDocReferenceJson_Expect_NarrativeStatementXmlOutputWithIdNeeded(String inputJson, String outputXml) {
226225
when(randomIdGeneratorService.createNewId()).thenReturn(TEST_ID);
227226
when(redactionsContext.isRedactionMessage()).thenReturn(true);
228227
when(randomIdGeneratorService.createNewOrUseExistingUUID(anyString())).thenReturn(TEST_ID);
@@ -240,7 +239,7 @@ void When_MappingDocReferenceJson_Expect_NarrativeStatementXmlOutput_WithIdNeede
240239
}
241240

242241
@Test
243-
void When_MappingDocReferenceJson_Expect_NarrativeStatementXmlOutput_WithIdNeeded2() {
242+
void When_MappingDocReferenceJson_Expect_NarrativeStatementXmlOutputWithIdAndOctetContentType() {
244243
when(redactionsContext.isRedactionMessage()).thenReturn(true);
245244
when(randomIdGeneratorService.createNewOrUseExistingUUID(anyString())).thenReturn(TEST_ID);
246245
when(supportedContentTypes.isContentTypeSupported(anyString()))

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/RequestStatementMapperTest.java

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.hl7.fhir.dstu3.model.Bundle;
1313
import org.hl7.fhir.dstu3.model.CodeableConcept;
1414
import org.hl7.fhir.dstu3.model.IdType;
15-
import org.hl7.fhir.dstu3.model.Reference;
1615
import org.hl7.fhir.dstu3.model.ReferralRequest;
1716
import org.hl7.fhir.dstu3.model.ResourceType;
1817
import org.junit.jupiter.api.AfterEach;
@@ -282,7 +281,8 @@ void When_MappingObservationJsonWithPractitionerRequester_Expect_NarrativeStatem
282281
.thenReturn("II-for-ReferralRequest-E63AF323-919F-4D5F-9A1D-BA933BC230BC");
283282

284283
when(messageContext.getAgentDirectory()).thenReturn(agentDirectory);
285-
when(agentDirectory.getAgentId(any())).thenReturn("II-for-Practitioner/6D340A1B-BC15-4D4E-93CF-BBCB5B74DF73-Organization/1F90B10F-CF14-4D6F-8C0D-585059DA4EC5");
284+
when(agentDirectory.getAgentId(any()))
285+
.thenReturn("II-for-Practitioner/6D340A1B-BC15-4D4E-93CF-BBCB5B74DF73-Organization/1F90B10F-CF14-4D6F-8C0D-585059DA4EC5");
286286

287287
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_PRACTITIONER_REQUESTER, OUTPUT_XML_WITH_PRACTITIONER_REQUESTER);
288288
}
@@ -384,7 +384,8 @@ void When_MappingObservationJsonWithPractitionerRequesterNoOnBehalfOf_Expect_Nar
384384
when(messageContext.getAgentDirectory()).thenReturn(agentDirectory);
385385
when(agentDirectory.getAgentId(any())).thenReturn("II-for-Practitioner/6D340A1B-BC15-4D4E-93CF-BBCB5B74DF73");
386386

387-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_PRACTITIONER_REQUESTER_NO_ONBEHALFOF, OUTPUT_XML_WITH_PRACTITIONER_REQUESTER_NO_ONBEHALFOF);
387+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_PRACTITIONER_REQUESTER_NO_ONBEHALFOF,
388+
OUTPUT_XML_WITH_PRACTITIONER_REQUESTER_NO_ONBEHALFOF);
388389
}
389390

390391
@Test
@@ -441,7 +442,8 @@ void When_MappingObservationJsonWithSupportingInfoDocumentReference_Expect_Narra
441442
when(idMapper.getOrNew(any(), any()))
442443
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
443444

444-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE, OUTPUT_XML_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE);
445+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE,
446+
OUTPUT_XML_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE);
445447
}
446448

447449
@Test
@@ -454,7 +456,8 @@ void When_MappingObservationJsonWithSupportingInfoDocumentReferenceNoDescription
454456
when(idMapper.getOrNew(any(), any()))
455457
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
456458

457-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE_NO_DESCRIPTION, OUTPUT_XML_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE_NO_DESCRIPTION);
459+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE_NO_DESCRIPTION,
460+
OUTPUT_XML_WITH_SUPPORTINGINFO_DOCUMENTREFERENCE_NO_DESCRIPTION);
458461
}
459462

460463
@Test
@@ -481,7 +484,8 @@ void When_MappingObservationJsonWithSupportingInfoObservation_Expect_NarrativeSt
481484
when(idMapper.getOrNew(any(), any()))
482485
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
483486

484-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_OBSERVATION, OUTPUT_XML_WITH_SUPPORTINGINFO_OBSERVATION);
487+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_OBSERVATION,
488+
OUTPUT_XML_WITH_SUPPORTINGINFO_OBSERVATION);
485489
}
486490

487491
@Test
@@ -494,7 +498,8 @@ void When_MappingObservationJsonWithSupportingInfoObservationEffectivePeriod_Exp
494498
when(idMapper.getOrNew(any(), any()))
495499
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
496500

497-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_OBSERVATION_EFFECTIVEPERIOD, OUTPUT_XML_WITH_SUPPORTINGINFO_OBSERVATION);
501+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_OBSERVATION_EFFECTIVEPERIOD,
502+
OUTPUT_XML_WITH_SUPPORTINGINFO_OBSERVATION);
498503
}
499504

500505
@Test
@@ -548,7 +553,8 @@ void When_MappingObservationJsonWithSupportingInfoReferralRequestNoDateNoReason_
548553
when(idMapper.getOrNew(any(), any()))
549554
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
550555

551-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_REFERRALREQUEST_NO_DATE_NO_REASON, OUTPUT_XML_WITH_SUPPORTINGINFO_REFERRALREQUEST_NO_DATE_NO_REASON);
556+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_REFERRALREQUEST_NO_DATE_NO_REASON,
557+
OUTPUT_XML_WITH_SUPPORTINGINFO_REFERRALREQUEST_NO_DATE_NO_REASON);
552558
}
553559

554560
@Test
@@ -561,7 +567,8 @@ void When_MappingObservationJsonWithSupportingInfoDiagnosticReport_Expect_Narrat
561567
when(idMapper.getOrNew(any(), any()))
562568
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
563569

564-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_DIAGNOSTICREPORT, OUTPUT_XML_WITH_SUPPORTINGINFO_DIAGNOSTICREPORT);
570+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_DIAGNOSTICREPORT,
571+
OUTPUT_XML_WITH_SUPPORTINGINFO_DIAGNOSTICREPORT);
565572
}
566573

567574
@Test
@@ -588,7 +595,8 @@ void When_MappingObservationJsonWithSupportingInfoMedicationRequest_Expect_Narra
588595
when(idMapper.getOrNew(any(), any()))
589596
.thenReturn("II-for-ReferralRequest-2FB2C828-F8EC-11EB-9A03-0242AC130003");
590597

591-
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_MEDICATIONREQUEST, OUTPUT_XML_WITH_SUPPORTINGINFO_MEDICATIONREQUEST);
598+
assertThatInputMapsToExpectedOutput(INPUT_JSON_WITH_SUPPORTINGINFO_MEDICATIONREQUEST,
599+
OUTPUT_XML_WITH_SUPPORTINGINFO_MEDICATIONREQUEST);
592600
}
593601

594602
@Test

0 commit comments

Comments
 (0)