This is an automated email from the ASF dual-hosted git repository.

chengzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 328e426beba Fix sonar issue on Rename this method name to match the 
regular expression: '^assert[A-Z][a-zA-Z0-9]*$' (#25808)
328e426beba is described below

commit 328e426bebae4e05b6bafc7b39428c6785250221
Author: Liang Zhang <[email protected]>
AuthorDate: Sat May 20 18:46:58 2023 +0800

    Fix sonar issue on Rename this method name to match the regular expression: 
'^assert[A-Z][a-zA-Z0-9]*$' (#25808)
    
    * Fix sonar issue on CosIdSnowflakeKeyGenerateAlgorithm and 
SnowflakeKeyGenerateAlgorithm
    
    * Fix sonar issue on CosIdSnowflakeKeyGenerateAlgorithm and 
SnowflakeKeyGenerateAlgorithm
    
    * Fix sonar issue on ShardingTableRuleStatementChecker
    
    * Fix sonar issue on Rename this method name to match the regular 
expression: '^assert[A-Z][a-zA-Z0-9]*$'
---
 .../query/PostgreSQLRowDescriptionPacketTest.java  |   2 +-
 .../PostgreSQLDialectExceptionMapperTest.java      |   2 +-
 .../merge/dql/orderby/CompareUtilsTest.java        |   4 +-
 .../engine/condition/ShardingConditionsTest.java   |   4 +-
 .../select/pagination/PaginationContextTest.java   |  20 +--
 .../infra/instance/util/IpUtilsTest.java           |   2 +-
 .../mode/YamlModeConfigurationSwapperTest.java     |   4 +-
 .../UnsupportedGeneratedKeysResultSetTest.java     | 158 +++++++++++----------
 .../connection/CircuitBreakerConnectionTest.java   |   2 +-
 .../data/pipeline/cdc/core/job/CDCJobIdTest.java   |   2 +-
 .../ingest/client/PasswordEncryptionTest.java      |   2 +-
 .../PostgreSQLDataSourceCheckerTest.java           |   2 +-
 .../YamlLoggingRuleConfigurationSwapperTest.java   |   4 +-
 ...amlTrafficStrategyConfigurationSwapperTest.java |   4 +-
 .../sql/parser/core/SQLParserFactoryTest.java      |   2 +-
 .../generic/table/SimpleTableSegmentTest.java      |   4 +-
 .../backend/state/impl/ReadOnlyProxyStateTest.java |   2 +-
 .../state/impl/UnavailableProxyStateTest.java      |   2 +-
 .../PostgreSQLCommandExecutorFactoryTest.java      |   2 +-
 19 files changed, 119 insertions(+), 105 deletions(-)

diff --git 
a/db-protocol/postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLRowDescriptionPacketTest.java
 
b/db-protocol/postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLRowDescriptionPacketTest.java
index 35f98210043..e11ce624ac0 100644
--- 
a/db-protocol/postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLRowDescriptionPacketTest.java
+++ 
b/db-protocol/postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLRowDescriptionPacketTest.java
@@ -54,7 +54,7 @@ class PostgreSQLRowDescriptionPacketTest {
     }
     
     @Test
-    void getMessageType() {
+    void assertGetIdentifier() {
         PostgreSQLRowDescriptionPacket packet = new 
PostgreSQLRowDescriptionPacket(Collections.emptyList());
         assertThat(packet.getIdentifier(), 
is(PostgreSQLMessagePacketType.ROW_DESCRIPTION));
     }
diff --git 
a/dialect-exception/postgresql/src/test/java/org/apache/shardingsphere/dialect/postgresql/mapper/PostgreSQLDialectExceptionMapperTest.java
 
b/dialect-exception/postgresql/src/test/java/org/apache/shardingsphere/dialect/postgresql/mapper/PostgreSQLDialectExceptionMapperTest.java
index c8d528a6223..2e87de2c21e 100644
--- 
a/dialect-exception/postgresql/src/test/java/org/apache/shardingsphere/dialect/postgresql/mapper/PostgreSQLDialectExceptionMapperTest.java
+++ 
b/dialect-exception/postgresql/src/test/java/org/apache/shardingsphere/dialect/postgresql/mapper/PostgreSQLDialectExceptionMapperTest.java
@@ -40,7 +40,7 @@ class PostgreSQLDialectExceptionMapperTest {
     
     @ParameterizedTest(name = "{1} -> {0}")
     @ArgumentsSource(TestCaseArgumentsProvider.class)
-    void convert(final Class<SQLDialectException> sqlDialectExceptionClazz, 
final String sqlState) {
+    void assertConvert(final Class<SQLDialectException> 
sqlDialectExceptionClazz, final String sqlState) {
         assertThat(new 
PostgreSQLDialectExceptionMapper().convert(mock(sqlDialectExceptionClazz)).getSQLState(),
 is(sqlState));
     }
     
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/CompareUtilsTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/CompareUtilsTest.java
index ab761d00262..4a9336e5ee9 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/CompareUtilsTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/CompareUtilsTest.java
@@ -84,12 +84,12 @@ class CompareUtilsTest {
     }
     
     @Test
-    void assetCompareToStringWithCaseSensitive() {
+    void assertCompareToStringWithCaseSensitive() {
         assertThat(CompareUtils.compareTo("A", "a", OrderDirection.DESC, 
NullsOrderType.FIRST, caseSensitive), is(32));
     }
     
     @Test
-    void assetCompareToStringWithCaseInsensitive() {
+    void assertCompareToStringWithCaseInsensitive() {
         assertThat(CompareUtils.compareTo("A", "a", OrderDirection.DESC, 
NullsOrderType.FIRST, !caseSensitive), is(0));
     }
 }
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/ShardingConditionsTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/ShardingConditionsTest.java
index 4721c707969..297d684b9db 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/ShardingConditionsTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/ShardingConditionsTest.java
@@ -55,13 +55,13 @@ class ShardingConditionsTest {
     }
     
     @Test
-    void isSameShardingConditionTrue() {
+    void assertIsSameShardingConditionTrue() {
         ShardingConditions shardingConditions = 
createSingleShardingConditions();
         assertTrue(shardingConditions.isSameShardingCondition());
     }
     
     @Test
-    void isSameShardingConditionFalse() {
+    void assertIsSameShardingConditionFalse() {
         ShardingConditions shardingConditions = 
createMultipleShardingConditions();
         assertFalse(shardingConditions.isSameShardingCondition());
     }
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
index 64910419b67..389f4bb2d1d 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
@@ -139,27 +139,27 @@ class PaginationContextTest {
     }
     
     @Test
-    void getRevisedRowCountForMySQL() {
+    void assertGetRevisedRowCountForMySQL() {
         getRevisedRowCount(new MySQLSelectStatement());
     }
     
     @Test
-    void getRevisedRowCountForOracle() {
+    void assertGetRevisedRowCountForOracle() {
         getRevisedRowCount(new OracleSelectStatement());
     }
     
     @Test
-    void getRevisedRowCountForPostgreSQL() {
+    void assertGetRevisedRowCountForPostgreSQL() {
         getRevisedRowCount(new PostgreSQLSelectStatement());
     }
     
     @Test
-    void getRevisedRowCountForSQL92() {
+    void assertGetRevisedRowCountForSQL92() {
         getRevisedRowCount(new SQL92SelectStatement());
     }
     
     @Test
-    void getRevisedRowCountForSQLServer() {
+    void assertGetRevisedRowCountForSQLServer() {
         getRevisedRowCount(new SQLServerSelectStatement());
     }
     
@@ -172,27 +172,27 @@ class PaginationContextTest {
     }
     
     @Test
-    void getRevisedRowCountWithMaxForMySQL() {
+    void assertGetRevisedRowCountWithMaxForMySQL() {
         getRevisedRowCountWithMax(new MySQLSelectStatement());
     }
     
     @Test
-    void getRevisedRowCountWithMaxForOracle() {
+    void assertGetRevisedRowCountWithMaxForOracle() {
         getRevisedRowCountWithMax(new OracleSelectStatement());
     }
     
     @Test
-    void getRevisedRowCountWithMaxForPostgreSQL() {
+    void assertGetRevisedRowCountWithMaxForPostgreSQL() {
         getRevisedRowCountWithMax(new PostgreSQLSelectStatement());
     }
     
     @Test
-    void getRevisedRowCountWithMaxForSQL92() {
+    void assertGetRevisedRowCountWithMaxForSQL92() {
         getRevisedRowCountWithMax(new SQL92SelectStatement());
     }
     
     @Test
-    void getRevisedRowCountWithMaxForSQLServer() {
+    void assertGetRevisedRowCountWithMaxForSQLServer() {
         getRevisedRowCountWithMax(new SQLServerSelectStatement());
     }
     
diff --git 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
index e665e4e084e..391331662c0 100644
--- 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
+++ 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
@@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 class IpUtilsTest {
     
     @Test
-    void getIp() {
+    void assertGetIp() {
         assertNotNull(IpUtils.getIp());
     }
 }
diff --git 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapperTest.java
 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapperTest.java
index 4c95a319992..91fdc4e72f9 100644
--- 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapperTest.java
+++ 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/mode/YamlModeConfigurationSwapperTest.java
@@ -31,13 +31,13 @@ class YamlModeConfigurationSwapperTest {
     private final YamlModeConfigurationSwapper swapper = new 
YamlModeConfigurationSwapper();
     
     @Test
-    void swapToYamlConfiguration() {
+    void assertSwapToYamlConfiguration() {
         YamlModeConfiguration actual = swapper.swapToYamlConfiguration(new 
ModeConfiguration("TEST_TYPE", null));
         assertThat(actual.getType(), is(TEST_TYPE));
     }
     
     @Test
-    void swapToObject() {
+    void assertSwapToObject() {
         YamlModeConfiguration yamlConfig = new YamlModeConfiguration();
         yamlConfig.setType(TEST_TYPE);
         ModeConfiguration actual = swapper.swapToObject(yamlConfig);
diff --git 
a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedGeneratedKeysResultSetTest.java
 
b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedGeneratedKeysResultSetTest.java
index f0901b684dd..a79163e27b5 100644
--- 
a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedGeneratedKeysResultSetTest.java
+++ 
b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedGeneratedKeysResultSetTest.java
@@ -18,6 +18,8 @@
 package org.apache.shardingsphere.driver.jdbc.unsupported;
 
 import 
org.apache.shardingsphere.driver.jdbc.core.resultset.GeneratedKeysResultSet;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import java.sql.ResultSet;
@@ -28,193 +30,205 @@ import static 
org.junit.jupiter.api.Assertions.assertThrows;
 
 class UnsupportedGeneratedKeysResultSetTest {
     
+    private GeneratedKeysResultSet actual;
+    
+    @BeforeEach
+    public void setUp() {
+        actual = new GeneratedKeysResultSet();
+    }
+    
+    @AfterEach
+    public void tearDown() {
+        actual.close();
+    }
+    
     @Test
-    void getBooleanWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getBoolean(1));
+    void assertGetBooleanWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getBoolean(1));
     }
     
     @Test
-    void getBooleanWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getBoolean(""));
+    void assertGetBooleanWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getBoolean(""));
     }
     
     @Test
-    void getDateWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getDate(1));
+    void assertGetDateWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getDate(1));
     }
     
     @Test
-    void getDateWithColumnIndexAndCalendar() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getDate(1, null));
+    void assertGetDateWithColumnIndexAndCalendar() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getDate(1, null));
     }
     
     @Test
-    void getDateWithWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getDate(""));
+    void assertGetDateWithWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getDate(""));
     }
     
     @Test
-    void getDateWithColumnLabelAndCalendar() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getDate("", null));
+    void assertGetDateWithColumnLabelAndCalendar() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getDate("", null));
     }
     
     @Test
-    void getTimeWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTime(1));
+    void assertGetTimeWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTime(1));
     }
     
     @Test
-    void getTimeWithColumnIndexAndCalendar() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTime(1, null));
+    void assertGetTimeWithColumnIndexAndCalendar() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTime(1, null));
     }
     
     @Test
-    void getTimeWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTime(""));
+    void assertGetTimeWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTime(""));
     }
     
     @Test
     void getTimeWithColumnLabelAndCalendar() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTime("", null));
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTime("", null));
     }
     
     @Test
     void getTimestampWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTimestamp(1));
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTimestamp(1));
     }
     
     @Test
     void getTimestampWithColumnIndexAndCalendar() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTimestamp(1, null));
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTimestamp(1, null));
     }
     
     @Test
-    void getTimestampWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTimestamp(""));
+    void assertGetTimestampWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTimestamp(""));
     }
     
     @Test
-    void getTimestampWithColumnLabelAndCalendar() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getTimestamp("", null));
+    void assertGetTimestampWithColumnLabelAndCalendar() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getTimestamp("", null));
     }
     
     @Test
-    void getAsciiStreamWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getAsciiStream(1));
+    void assertGetAsciiStreamWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getAsciiStream(1));
     }
     
     @Test
-    void getAsciiStreamWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getAsciiStream(""));
+    void assertGetAsciiStreamWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getAsciiStream(""));
     }
     
     @Test
-    void getUnicodeStreamWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getUnicodeStream(1));
+    void assertGetUnicodeStreamWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getUnicodeStream(1));
     }
     
     @Test
-    void getUnicodeStreamWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getUnicodeStream(""));
+    void assertGetUnicodeStreamWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getUnicodeStream(""));
     }
     
     @Test
-    void getBinaryStreamWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getBinaryStream(1));
+    void assertGetBinaryStreamWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getBinaryStream(1));
     }
     
     @Test
-    void getBinaryStreamWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getBinaryStream(""));
+    void assertGetBinaryStreamWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getBinaryStream(""));
     }
     
     @Test
-    void getCharacterStreamWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getCharacterStream(1));
+    void assertGetCharacterStreamWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getCharacterStream(1));
     }
     
     @Test
-    void getCharacterStreamWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getCharacterStream(""));
+    void assertGetCharacterStreamWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getCharacterStream(""));
     }
     
     @Test
-    void getBlobWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getBlob(1));
+    void assertGetBlobWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getBlob(1));
     }
     
     @Test
-    void getBlobWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getBlob(""));
+    void assertGetBlobWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getBlob(""));
     }
     
     @Test
-    void getClobWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getClob(1));
+    void assertGetClobWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getClob(1));
     }
     
     @Test
-    void getClobWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getClob(""));
+    void assertGetClobWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getClob(""));
     }
     
     @Test
-    void getURLWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getURL(1));
+    void assertGetURLWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getURL(1));
     }
     
     @Test
-    void getURLWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getURL(""));
+    void assertGetURLWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getURL(""));
     }
     
     @Test
-    void getSQLXMLWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getSQLXML(1));
+    void assertGetSQLXMLWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getSQLXML(1));
     }
     
     @Test
-    void getSQLXMLWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getSQLXML(""));
+    void assertGetSQLXMLWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getSQLXML(""));
     }
     
     @Test
-    void getObjectWithColumnIndex() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getObject(1, Collections.emptyMap()));
+    void assertGetObjectWithColumnIndex() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getObject(1, Collections.emptyMap()));
     }
     
     @Test
-    void getObjectWithColumnLabel() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getObject("", Collections.emptyMap()));
+    void assertGetObjectWithColumnLabel() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getObject("", Collections.emptyMap()));
     }
     
     @Test
-    void setFetchDirection() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().setFetchDirection(ResultSet.FETCH_FORWARD));
+    void assertSetFetchDirection() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.setFetchDirection(ResultSet.FETCH_FORWARD));
     }
     
     @Test
     void getFetchDirection() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getFetchDirection());
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getFetchDirection());
     }
     
     @Test
-    void setFetchSize() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().setFetchSize(1));
+    void assertSetFetchSize() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.setFetchSize(1));
     }
     
     @Test
-    void getFetchSize() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getFetchSize());
+    void assertGetFetchSize() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getFetchSize());
     }
     
     @Test
-    void getWarnings() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().getWarnings());
+    void assertGetWarnings() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.getWarnings());
     }
     
     @Test
-    void clearWarnings() {
-        assertThrows(SQLFeatureNotSupportedException.class, () -> new 
GeneratedKeysResultSet().clearWarnings());
+    void assertClearWarnings() {
+        assertThrows(SQLFeatureNotSupportedException.class, () -> 
actual.clearWarnings());
     }
 }
diff --git 
a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnectionTest.java
 
b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnectionTest.java
index cb041b9d207..387244d28cb 100644
--- 
a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnectionTest.java
+++ 
b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnectionTest.java
@@ -43,7 +43,7 @@ class CircuitBreakerConnectionTest {
     }
     
     @Test
-    void setReadOnly() {
+    void assertSetReadOnly() {
         connection.setReadOnly(true);
         assertFalse(connection.isReadOnly());
     }
diff --git 
a/kernel/data-pipeline/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/core/job/CDCJobIdTest.java
 
b/kernel/data-pipeline/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/core/job/CDCJobIdTest.java
index e16e17cdb64..221d4117ca6 100644
--- 
a/kernel/data-pipeline/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/core/job/CDCJobIdTest.java
+++ 
b/kernel/data-pipeline/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/core/job/CDCJobIdTest.java
@@ -33,7 +33,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
 class CDCJobIdTest {
     
     @Test
-    void parseJobType() {
+    void assertParseJobType() {
         PipelineContextKey contextKey = 
PipelineContextKey.build("sharding_db", InstanceType.PROXY);
         CDCJobId pipelineJobId = new CDCJobId(contextKey, 
Arrays.asList("test", "t_order"), false, CDCSinkType.SOCKET.name());
         String jobId = 
PipelineJobIdUtils.marshalJobIdCommonPrefix(pipelineJobId) + "abcd";
diff --git 
a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/PasswordEncryptionTest.java
 
b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/PasswordEncryptionTest.java
index f42ecfb8af7..fd23fe62396 100644
--- 
a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/PasswordEncryptionTest.java
+++ 
b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/PasswordEncryptionTest.java
@@ -41,7 +41,7 @@ class PasswordEncryptionTest {
     
     @SneakyThrows(NoSuchAlgorithmException.class)
     @Test
-    void encryptEncryptWithSha2() {
+    void assertEncryptEncryptWithSha2() {
         assertThat(PasswordEncryption.encryptWithSha2("123456".getBytes(), 
getRandomSeed()), is(getSha2ExpectedPassword()));
     }
     
diff --git 
a/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/check/datasource/PostgreSQLDataSourceCheckerTest.java
 
b/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/check/datasource/PostgreSQLDataSourceCheckerTest.java
index f0c3e45f877..c532fe824ee 100644
--- 
a/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/check/datasource/PostgreSQLDataSourceCheckerTest.java
+++ 
b/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/check/datasource/PostgreSQLDataSourceCheckerTest.java
@@ -85,7 +85,7 @@ class PostgreSQLDataSourceCheckerTest {
     }
     
     @Test
-    void asserCheckNoPrivilege() throws SQLException {
+    void assertCheckNoPrivilege() throws SQLException {
         PostgreSQLDataSourceChecker dataSourceChecker = new 
PostgreSQLDataSourceChecker();
         when(resultSet.getString("rolsuper")).thenReturn("f");
         when(resultSet.getString("rolreplication")).thenReturn("f");
diff --git 
a/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/YamlLoggingRuleConfigurationSwapperTest.java
 
b/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/YamlLoggingRuleConfigurationSwapperTest.java
index 6294d45b4ce..832af913d55 100644
--- 
a/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/YamlLoggingRuleConfigurationSwapperTest.java
+++ 
b/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/YamlLoggingRuleConfigurationSwapperTest.java
@@ -40,7 +40,7 @@ class YamlLoggingRuleConfigurationSwapperTest {
     private final YamlAppenderSwapper appenderSwapper = new 
YamlAppenderSwapper();
     
     @Test
-    void swapToYamlConfiguration() {
+    void assertSwapToYamlConfiguration() {
         YamlLoggingRuleConfiguration yamlLoggingRuleConfiguration = 
swapper.swapToYamlConfiguration(createLoggingRuleConfiguration());
         assertThat(yamlLoggingRuleConfiguration.getLoggers().size(), is(1));
         assertThat(yamlLoggingRuleConfiguration.getAppenders().size(), is(1));
@@ -52,7 +52,7 @@ class YamlLoggingRuleConfigurationSwapperTest {
     }
     
     @Test
-    void swapToObject() {
+    void assertSwapToObject() {
         LoggingRuleConfiguration loggingRuleConfiguration = 
swapper.swapToObject(createYamlLoggingRuleConfiguration());
         assertThat(loggingRuleConfiguration.getLoggers().size(), is(1));
         assertThat(loggingRuleConfiguration.getAppenders().size(), is(1));
diff --git 
a/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/YamlTrafficStrategyConfigurationSwapperTest.java
 
b/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/YamlTrafficStrategyConfigurationSwapperTest.java
index 7993df5aa09..b06f7d775d4 100644
--- 
a/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/YamlTrafficStrategyConfigurationSwapperTest.java
+++ 
b/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/YamlTrafficStrategyConfigurationSwapperTest.java
@@ -44,7 +44,7 @@ class YamlTrafficStrategyConfigurationSwapperTest {
     private final YamlTrafficStrategyConfigurationSwapper swapper = new 
YamlTrafficStrategyConfigurationSwapper();
     
     @Test
-    void swapToYamlConfiguration() {
+    void assertSwapToYamlConfiguration() {
         YamlTrafficStrategyConfiguration yamlStrategyConfig = 
swapper.swapToYamlConfiguration(createTrafficStrategyConfiguration());
         assertThat(yamlStrategyConfig.getName(), is(NAME));
         assertThat(yamlStrategyConfig.getLabels(), is(LABELS));
@@ -57,7 +57,7 @@ class YamlTrafficStrategyConfigurationSwapperTest {
     }
     
     @Test
-    void swapToObject() {
+    void assertSwapToObject() {
         TrafficStrategyConfiguration strategyConfig = 
swapper.swapToObject(createYamlTrafficStrategyConfiguration());
         assertThat(strategyConfig.getName(), is(NAME));
         assertThat(strategyConfig.getLabels(), is(LABELS));
diff --git 
a/parser/sql/engine/src/test/java/org/apache/shardingsphere/sql/parser/core/SQLParserFactoryTest.java
 
b/parser/sql/engine/src/test/java/org/apache/shardingsphere/sql/parser/core/SQLParserFactoryTest.java
index 674deabcb00..64198e3ae2d 100644
--- 
a/parser/sql/engine/src/test/java/org/apache/shardingsphere/sql/parser/core/SQLParserFactoryTest.java
+++ 
b/parser/sql/engine/src/test/java/org/apache/shardingsphere/sql/parser/core/SQLParserFactoryTest.java
@@ -32,7 +32,7 @@ class SQLParserFactoryTest {
     private static final String SQL = "SELECT COUNT(*) FROM user";
     
     @Test
-    void newInstance() {
+    void assertNewInstance() {
         SQLLexer sqlLexer = mock(LexerFixture.class);
         SQLParser sqlParser = mock(ParserFixture.class);
         SQLParser result = SQLParserFactory.newInstance(SQL, 
sqlLexer.getClass(), sqlParser.getClass());
diff --git 
a/parser/sql/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/segment/generic/table/SimpleTableSegmentTest.java
 
b/parser/sql/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/segment/generic/table/SimpleTableSegmentTest.java
index 2c1427fdee9..46bf10fe12d 100644
--- 
a/parser/sql/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/segment/generic/table/SimpleTableSegmentTest.java
+++ 
b/parser/sql/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/segment/generic/table/SimpleTableSegmentTest.java
@@ -27,13 +27,13 @@ import static org.hamcrest.MatcherAssert.assertThat;
 class SimpleTableSegmentTest {
     
     @Test
-    void getStartIndexWithoutOwner() {
+    void assertGetStartIndexWithoutOwner() {
         SimpleTableSegment tableSegment = new SimpleTableSegment(new 
TableNameSegment(10, 13, new IdentifierValue("tbl")));
         assertThat(tableSegment.getStartIndex(), is(10));
     }
     
     @Test
-    void getStartIndexWithOwner() {
+    void assertGetStartIndexWithOwner() {
         SimpleTableSegment tableSegment = new SimpleTableSegment(new 
TableNameSegment(10, 13, new IdentifierValue("tbl")));
         tableSegment.setOwner(new OwnerSegment(7, 8, new 
IdentifierValue("o")));
         assertThat(tableSegment.getStartIndex(), is(7));
diff --git 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
index 7e6e9bdda48..82a21ac61bc 100644
--- 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
+++ 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
@@ -33,7 +33,7 @@ class ReadOnlyProxyStateTest {
     }
     
     @Test
-    void executeWithSupportedSQL() {
+    void assertExecuteWithSupportedSQL() {
         new ReadOnlyProxyState().check(mock(SelectStatement.class));
     }
 }
diff --git 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
index 2f369712872..dc58bdb8086 100644
--- 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
+++ 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
@@ -33,7 +33,7 @@ class UnavailableProxyStateTest {
     }
     
     @Test
-    void executeWithSupportedSQL() {
+    void assertExecuteWithSupportedSQL() {
         new UnavailableProxyState().check(mock(ImportMetaDataStatement.class));
     }
 }
diff --git 
a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecutorFactoryTest.java
 
b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecutorFactoryTest.java
index 726a300654c..e5f5381d98e 100644
--- 
a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecutorFactoryTest.java
+++ 
b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecutorFactoryTest.java
@@ -153,7 +153,7 @@ class PostgreSQLCommandExecutorFactoryTest {
     }
     
     @Test
-    void asserAggregatedFlushPacket() throws SQLException {
+    void assertAggregatedFlushPacket() throws SQLException {
         PostgreSQLComFlushPacket flushPacket = 
mock(PostgreSQLComFlushPacket.class);
         
when(flushPacket.getIdentifier()).thenReturn(PostgreSQLCommandPacketType.FLUSH_COMMAND);
         PostgreSQLComSyncPacket syncPacket = 
mock(PostgreSQLComSyncPacket.class);


Reply via email to