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 ;
1715
@@ -114,9 +112,9 @@ void testMaskingAnonymization() {
114112 var maskingResult = result .getModuleResults ().getInputMasking ();
115113 assertThat (maskingResult .getMessage ()).isNotEmpty ();
116114 var data = (Map <String , Object >) maskingResult .getData ();
117- var maskedMessage = (( List < Map < String , Object >> ) data .get ("masked_template" )). get ( 0 );
118- assertThat (maskedMessage . get ( "content" ) )
119- .asInstanceOf ( InstanceOfAssertFactories . STRING )
115+ var maskedMessage = (String ) data .get ("masked_template" );
116+ assertThat (maskedMessage )
117+ .describedAs ( "The masked input should not contain any user names" )
120118 .doesNotContain ("Alice" , "Bob" );
121119
122120 assertThat (result .getModuleResults ().getOutputUnmasking ()).isEmpty ();
You can’t perform that action at this time.
0 commit comments