File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 88import com .sap .ai .sdk .orchestration .client .model .CompletionPostResponse ;
99import com .sap .ai .sdk .orchestration .client .model .LLMChoice ;
1010import com .sap .ai .sdk .orchestration .client .model .LLMModuleResultSynchronous ;
11- import java .util .List ;
1211import java .util .Map ;
1312import lombok .extern .slf4j .Slf4j ;
14- import org .assertj .core .api .InstanceOfAssertFactories ;
1513import org .junit .jupiter .api .BeforeEach ;
1614import org .junit .jupiter .api .Test ;
1715import 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 ();
You can’t perform that action at this time.
0 commit comments