From 184815def765193130712b499892e9f41106cbe4 Mon Sep 17 00:00:00 2001 From: arybakov Date: Wed, 8 Nov 2023 14:21:43 -0700 Subject: [PATCH] GRAD2-2306 HD-21559-GRAD - P3 - GRAD is creating blank transcripts --- .../bc/gov/educ/api/dataconversion/util/RestUtilsTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/util/RestUtilsTest.java b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/util/RestUtilsTest.java index 93e1f21c..9504a35b 100644 --- a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/util/RestUtilsTest.java +++ b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/util/RestUtilsTest.java @@ -2,8 +2,8 @@ import ca.bc.gov.educ.api.dataconversion.messaging.NatsConnection; import ca.bc.gov.educ.api.dataconversion.messaging.jetstream.Subscriber; -import ca.bc.gov.educ.api.dataconversion.model.*; import ca.bc.gov.educ.api.dataconversion.model.StudentAssessment; +import ca.bc.gov.educ.api.dataconversion.model.*; import ca.bc.gov.educ.api.dataconversion.model.tsw.*; import ca.bc.gov.educ.api.dataconversion.model.tsw.report.ReportData; import ca.bc.gov.educ.api.dataconversion.model.tsw.report.ReportOptions; @@ -34,7 +34,8 @@ import java.util.function.Function; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; import static org.mockito.MockitoAnnotations.openMocks; @@ -503,6 +504,7 @@ public void testGetTranscriptReport_givenValues_returnByteArray_withAPICallSucce when(this.requestBodyMock.contentType(any())).thenReturn(this.requestBodyMock); when(this.requestBodyMock.body(any(BodyInserter.class))).thenReturn(this.requestHeadersMock); when(this.requestHeadersMock.retrieve()).thenReturn(this.responseMock); + when(this.responseMock.onStatus(any(), any())).thenReturn(this.responseMock); when(this.responseMock.bodyToMono(byte[].class)).thenReturn(Mono.just(bytesSAR)); val result = restUtils.getTranscriptReport(reportParams, "abc");