JoshuaChen commented on code in PR #34409:
URL: https://github.com/apache/shardingsphere/pull/34409#discussion_r1922153453


##########
features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/checker/sql/insert/EncryptInsertSelectSupportedCheckerTest.java:
##########
@@ -38,7 +40,7 @@ class EncryptInsertSelectSupportedCheckerTest {
     @Test
     void assertIsCheck() {
         InsertStatementContext sqlStatementContext = 
mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
-        
when(sqlStatementContext.getSqlStatement().getInsertSelect().isPresent()).thenReturn(true);
+        
when(sqlStatementContext.getSqlStatement().getInsertSelect()).thenReturn(Optional.of(mock(SubquerySegment.class)));

Review Comment:
   The new version of mock will prompt that the thenReturn type is wrong, and 
Optional.of(mock(SubquerySegment.class)) is required to return



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to