Skip to content

Commit e386bd2

Browse files
Removed lenient from DocumentToMHSTranslatorTest
1 parent cb7d41c commit e386bd2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

service/src/test/java/uk/nhs/adaptors/gp2gp/gpc/DocumentToMHSTranslatorTest.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import org.junit.jupiter.api.extension.ExtendWith;
88
import org.mockito.Mock;
99
import org.mockito.junit.jupiter.MockitoExtension;
10-
import org.mockito.junit.jupiter.MockitoSettings;
11-
import org.mockito.quality.Strictness;
1210
import com.fasterxml.jackson.databind.ObjectMapper;
1311
import uk.nhs.adaptors.gp2gp.common.service.FhirParseService;
1412
import uk.nhs.adaptors.gp2gp.common.service.RandomIdGeneratorService;
@@ -23,7 +21,6 @@
2321
import static org.mockito.Mockito.when;
2422

2523
@ExtendWith(MockitoExtension.class)
26-
@MockitoSettings(strictness = Strictness.LENIENT)
2724
public class DocumentToMHSTranslatorTest {
2825
private static final String TEST_FILE_DIRECTORY = "/ehr/request/fhir/";
2926
private static final String INPUT_DIRECTORY = "input/";
@@ -69,8 +66,8 @@ public static void initialize() {
6966

7067
@BeforeEach
7168
public void setUp() {
72-
when(timestampService.now()).thenReturn(Instant.parse(TEST_DATE_TIME));
73-
when(randomIdGeneratorService.createNewId()).thenReturn(TEST_ID);
69+
// when(timestampService.now()).thenReturn(Instant.parse(TEST_DATE_TIME));
70+
// when(randomIdGeneratorService.createNewId()).thenReturn(TEST_ID);
7471

7572
documentToMHSTranslator = new DocumentToMHSTranslator(
7673
new ObjectMapper(),
@@ -79,6 +76,9 @@ public void setUp() {
7976

8077
@Test
8178
void When_TranslatingDocumentData_Expect_ProperMhsOutboundRequestPayload() {
79+
when(timestampService.now()).thenReturn(Instant.parse(TEST_DATE_TIME));
80+
when(randomIdGeneratorService.createNewId()).thenReturn(TEST_ID);
81+
8282
GetGpcDocumentTaskDefinition taskDefinition = GetGpcDocumentTaskDefinition.builder()
8383
.messageId(MESSAGE_ID)
8484
.documentId(TEST_DOCUMENT_ID)
@@ -92,6 +92,9 @@ void When_TranslatingDocumentData_Expect_ProperMhsOutboundRequestPayload() {
9292

9393
@Test
9494
void When_TranslatingFileContentData_Expect_ProperMhsOutboundRequestPayload() {
95+
when(timestampService.now()).thenReturn(Instant.parse(TEST_DATE_TIME));
96+
when(randomIdGeneratorService.createNewId()).thenReturn(TEST_ID);
97+
9598
final GetAbsentAttachmentTaskDefinition taskDefinition = GetAbsentAttachmentTaskDefinition.builder()
9699
.title(TEST_TITLE)
97100
.messageId(MESSAGE_ID)

0 commit comments

Comments
 (0)