Skip to content

Commit 9195bde

Browse files
More tests
1 parent 8b26ce4 commit 9195bde

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,18 @@ void testGrounding() throws IOException {
205205
"grounding_result",
206206
"First chunk```Second chunk```Last found chunk");
207207
assertThat(groundingModule.getData()).isEqualTo(groundingData);
208-
assertThat(response.getOriginalResponse().getModuleResults().getInputMasking()).isNotNull();
208+
209+
var inputMasking = response.getOriginalResponse().getModuleResults().getInputMasking();
210+
assertThat(inputMasking.getMessage())
211+
.isEqualTo("Input to LLM and Grounding is masked successfully.");
212+
Object data = inputMasking.getData();
213+
assertThat(data)
214+
.isEqualTo(
215+
Map.of(
216+
"masked_template",
217+
"[{\"role\": \"user\", \"content\": \"Context message with embedded grounding results. First chunk```MASKED_SENSITIVE_DATA```Last found chunk\"}]",
218+
"masked_grounding_input",
219+
"[\"What does Joule do?\"]"));
209220

210221
try (var requestInputStream = fileLoader.apply("groundingRequest.json")) {
211222
final String request = new String(requestInputStream.readAllBytes());

0 commit comments

Comments
 (0)