Skip to content

Commit a8f8332

Browse files
authored
Revert stub change
1 parent 39aa1d5 commit a8f8332

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)