File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
orchestration/src/test/java/com/sap/ai/sdk/orchestration Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -646,11 +646,8 @@ void streamChatCompletionDeltas() throws IOException {
646646 @ Test
647647 void testRequestWithMultiChatMessage () throws IOException {
648648
649- var expectedJsonRequest =
650- new String (fileLoader .apply ("multiChatMessageRequest.json" ).readAllBytes ());
651649 stubFor (
652650 post ("/completion" )
653- .withRequestBody (equalToJson (expectedJsonRequest , true , false ))
654651 .willReturn (
655652 aResponse ().withStatus (SC_OK ).withBodyFile ("multiChatMessageResponse.json" )));
656653
@@ -742,7 +739,12 @@ void testRequestWithMultiChatMessage() throws IOException {
742739 assertThat (orchestrationResult .getUsage ().getPromptTokens ()).isEqualTo (928 );
743740 assertThat (orchestrationResult .getUsage ().getTotalTokens ()).isEqualTo (959 );
744741
745- verify (postRequestedFor (urlPathEqualTo ("/completion" )));
742+ try (var requestInputStream = fileLoader .apply ("multiChatMessageRequest.json" )) {
743+ final String requestBody = new String (requestInputStream .readAllBytes ());
744+ verify (
745+ postRequestedFor (urlPathEqualTo ("/completion" ))
746+ .withRequestBody (equalToJson (requestBody )));
747+ }
746748 }
747749
748750 @ SneakyThrows
You can’t perform that action at this time.
0 commit comments