Skip to content

Commit 088d69b

Browse files
authored
Merge branch 'main' into chore/e2e-test-matrix-build
2 parents a24e30b + a1b7749 commit 088d69b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OrchestrationTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
import com.sap.ai.sdk.orchestration.client.model.CompletionPostResponse;
99
import com.sap.ai.sdk.orchestration.client.model.LLMChoice;
1010
import com.sap.ai.sdk.orchestration.client.model.LLMModuleResultSynchronous;
11-
import java.util.List;
1211
import java.util.Map;
1312
import lombok.extern.slf4j.Slf4j;
14-
import org.assertj.core.api.InstanceOfAssertFactories;
1513
import org.junit.jupiter.api.BeforeEach;
1614
import org.junit.jupiter.api.Test;
1715
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
@@ -115,9 +113,9 @@ void testMaskingAnonymization() {
115113
var maskingResult = result.getModuleResults().getInputMasking();
116114
assertThat(maskingResult.getMessage()).isNotEmpty();
117115
var data = (Map<String, Object>) maskingResult.getData();
118-
var maskedMessage = ((List<Map<String, Object>>) data.get("masked_template")).get(0);
119-
assertThat(maskedMessage.get("content"))
120-
.asInstanceOf(InstanceOfAssertFactories.STRING)
116+
var maskedMessage = (String) data.get("masked_template");
117+
assertThat(maskedMessage)
118+
.describedAs("The masked input should not contain any user names")
121119
.doesNotContain("Alice", "Bob");
122120

123121
assertThat(result.getModuleResults().getOutputUnmasking()).isEmpty();

0 commit comments

Comments
 (0)