You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/05/02 17:07:28 UTC

[shardingsphere] branch master updated: Remove useless assertNotNull (#17280)

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

zhaojinchao 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 f03b4b27e20 Remove useless assertNotNull (#17280)
f03b4b27e20 is described below

commit f03b4b27e2092ecd5c5d67a3e73aa741739a35c5
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue May 3 01:07:19 2022 +0800

    Remove useless assertNotNull (#17280)
    
    * Remove useless assertNotNull
    
    * Remove useless test cases
---
 .../agent/core/entity/InterceptorConvertTest.java  |  6 ++--
 .../agent/metrics/api/MetricsPoolTest.java         |  8 ++---
 .../advice/CommandExecutorTaskAdviceTest.java      |  3 --
 .../advice/JDBCExecutorCallbackAdviceTest.java     |  5 ---
 .../advice/SQLParserEngineAdviceTest.java          |  4 ---
 .../advice/CommandExecutorTaskAdviceTest.java      |  3 --
 .../advice/JDBCExecutorCallbackAdviceTest.java     |  4 ---
 .../zipkin/advice/SQLParserEngineAdviceTest.java   |  4 ---
 .../PostgreSQLArrayParameterDecoderTest.java       | 10 ------
 ...PostgreSQLBoolArrayBinaryProtocolValueTest.java |  2 --
 ...stgreSQLFloat4ArrayBinaryProtocolValueTest.java |  2 --
 ...stgreSQLFloat8ArrayBinaryProtocolValueTest.java |  2 --
 ...PostgreSQLInt2ArrayBinaryProtocolValueTest.java |  2 --
 ...PostgreSQLInt4ArrayBinaryProtocolValueTest.java |  2 --
 ...PostgreSQLInt8ArrayBinaryProtocolValueTest.java |  2 --
 .../PostgreSQLNumericBinaryProtocolValueTest.java  |  4 ---
 ...stgreSQLStringArrayBinaryProtocolValueTest.java |  2 --
 ...stgreSQLUnspecifiedBinaryProtocolValueTest.java |  6 ++--
 .../parse/PostgreSQLComParsePacketTest.java        |  7 ++--
 ...orithmProviderConfigurationYamlSwapperTest.java |  3 --
 .../DatabaseDiscoverySpringNamespaceTest.java      |  3 --
 .../DecoratedEncryptColumnsMergedResultTest.java   |  2 --
 .../token/EncryptTokenGenerateBuilderTest.java     |  2 --
 ...cryptTableRuleConfigurationYamlSwapperTest.java |  4 ---
 .../EncryptRuleStatementConverterTest.java         |  2 --
 .../rule/ReadwriteSplittingRuleTest.java           |  2 --
 ...orithmProviderConfigurationYamlSwapperTest.java | 10 ------
 ...eSplittingRuleConfigurationYamlSwapperTest.java |  3 --
 ...amlReadwriteSplittingRuleConfigurationTest.java |  2 --
 .../ReadwriteSplittingSpringBootStarterTest.java   |  4 +--
 .../ReadwriteSplittingSpringNamespaceTest.java     |  5 +--
 ...orithmProviderConfigurationYamlSwapperTest.java |  4 ---
 .../pojo/ShardingTokenGenerateBuilderTest.java     |  2 --
 .../statement/SQLStatementContextFactoryTest.java  | 13 +++----
 .../statement/impl/InsertStatementContextTest.java |  9 +++--
 .../infra/datanode/DataNodeTest.java               |  2 --
 .../datasource/props/DataSourcePropertiesTest.java |  2 --
 .../metadata/resource/DataSourcesMetaDataTest.java |  6 ++--
 .../yaml/schema/swapper/SchemaYamlSwapperTest.java |  2 --
 .../token/generator/SQLTokenGeneratorsTest.java    | 28 ++++-----------
 .../driver/jdbc/adapter/ResultSetAdapterTest.java  |  8 ++---
 .../datasource/ShardingSphereDataSourceTest.java   |  3 --
 .../jdbc/core/resultset/ResultSetUtilTest.java     |  2 --
 .../authority/checker/AuthorityCheckerTest.java    |  5 ---
 .../AuthorityRuleConfigurationYamlSwapperTest.java |  1 -
 .../rule/builder/TrafficRuleBuilderTest.java       | 40 ----------------------
 .../context/TransactionContextsTest.java           |  3 +-
 .../mode/manager/ContextManagerTest.java           |  1 -
 .../ClusterContextManagerCoordinatorTest.java      |  1 -
 .../ProcessRegistrySubscriberTestNoMock.java       |  5 ---
 .../zookeeper/CuratorZookeeperRepositoryTest.java  |  4 ---
 .../database/DropDatabaseBackendHandlerTest.java   | 13 +++----
 .../common/updatable/SetVariableExecutorTest.java  |  2 --
 .../spi/type/typed/TypedSPIRegistryTest.java       |  4 +--
 .../sql/common/extractor/TableExtractorTest.java   |  2 --
 .../AlterSQLParserRuleStatementAssert.java         |  1 -
 .../updatable/AlterTrafficRuleStatementAssert.java |  2 --
 .../CreateTrafficRuleStatementAssert.java          |  2 --
 ...rDatabaseDiscoveryHeartbeatStatementAssert.java |  1 -
 .../AlterDatabaseDiscoveryTypeStatementAssert.java |  1 -
 .../impl/AlterShadowAlgorithmStatementAssert.java  |  1 -
 ...eDatabaseDiscoveryHeartbeatStatementAssert.java |  1 -
 ...CreateDatabaseDiscoveryRuleStatementAssert.java | 13 -------
 ...CreateDatabaseDiscoveryTypeStatementAssert.java |  1 -
 .../statement/dml/impl/CallStatementAssert.java    |  6 ++--
 .../prepare/InventoryTaskSplitterTest.java         |  3 --
 66 files changed, 42 insertions(+), 272 deletions(-)

diff --git a/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/entity/InterceptorConvertTest.java b/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/entity/InterceptorConvertTest.java
index 6cd95be9c22..1447df58306 100644
--- a/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/entity/InterceptorConvertTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/entity/InterceptorConvertTest.java
@@ -20,8 +20,7 @@ package org.apache.shardingsphere.agent.core.entity;
 import org.junit.Test;
 import org.yaml.snakeyaml.Yaml;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 
 public final class InterceptorConvertTest {
     
@@ -29,7 +28,6 @@ public final class InterceptorConvertTest {
     public void assertConvert() {
         Yaml yaml = new Yaml();
         Interceptors interceptors = yaml.loadAs(this.getClass().getResourceAsStream("/interceptors.yaml"), Interceptors.class);
-        assertNotNull(interceptors);
-        assertTrue(interceptors.getInterceptors().size() > 0);
+        assertFalse(interceptors.getInterceptors().isEmpty());
     }
 }
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/test/java/org/apache/shardingsphere/agent/metrics/api/MetricsPoolTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/test/java/org/apache/shardingsphere/agent/metrics/api/MetricsPoolTest.java
index d7c1dfdbc0d..091e719c173 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/test/java/org/apache/shardingsphere/agent/metrics/api/MetricsPoolTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/test/java/org/apache/shardingsphere/agent/metrics/api/MetricsPoolTest.java
@@ -20,18 +20,14 @@ package org.apache.shardingsphere.agent.metrics.api;
 import org.apache.shardingsphere.agent.metrics.api.fixture.FixtureWrapperFactory;
 import org.junit.Test;
 
-import java.util.Optional;
-
-import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 public final class MetricsPoolTest {
     
-    @SuppressWarnings("OptionalGetWithoutIsPresent")
     @Test
     public void assertCreate() {
         MetricsPool.setMetricsFactory(new FixtureWrapperFactory());
         MetricsPool.create("test");
-        Optional<MetricsWrapper> wrapper = MetricsPool.get("test");
-        assertNotNull(wrapper.get());
+        assertTrue(MetricsPool.get("test").isPresent());
     }
 }
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdviceTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAd [...]
index 6ee88f1537e..063a634553a 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdviceTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdviceTest.java
@@ -33,7 +33,6 @@ import java.io.IOException;
 import java.util.List;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class CommandExecutorTaskAdviceTest extends AbstractCommandExecutorTaskAdviceTest {
@@ -53,7 +52,6 @@ public final class CommandExecutorTaskAdviceTest extends AbstractCommandExecutor
         advice.beforeMethod(getTargetObject(), null, new Object[]{}, new MethodInvocationResult());
         advice.afterMethod(getTargetObject(), null, new Object[]{}, new MethodInvocationResult());
         List<SpanData> spanItems = COLLECTOR.getSpanItems();
-        assertNotNull(spanItems);
         assertThat(spanItems.size(), is(1));
         SpanData spanData = spanItems.get(0);
         assertThat(spanData.getName(), is("/ShardingSphere/rootInvoke/"));
@@ -67,7 +65,6 @@ public final class CommandExecutorTaskAdviceTest extends AbstractCommandExecutor
         advice.onThrowing(getTargetObject(), null, new Object[]{}, new IOException());
         advice.afterMethod(getTargetObject(), null, new Object[]{}, new MethodInvocationResult());
         List<SpanData> spanItems = COLLECTOR.getSpanItems();
-        assertNotNull(spanItems);
         assertThat(spanItems.size(), is(1));
         SpanData spanData = spanItems.get(0);
         assertThat(spanData.getName(), is("/ShardingSphere/rootInvoke/"));
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdviceTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallback [...]
index 0b1ac4ac8bf..055cfdf0617 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdviceTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdviceTest.java
@@ -33,7 +33,6 @@ import java.io.IOException;
 import java.util.List;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class JDBCExecutorCallbackAdviceTest extends AbstractJDBCExecutorCallbackAdviceTest {
@@ -53,12 +52,10 @@ public final class JDBCExecutorCallbackAdviceTest extends AbstractJDBCExecutorCa
         advice.beforeMethod(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new MethodInvocationResult());
         advice.afterMethod(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new MethodInvocationResult());
         List<SpanData> spanItems = COLLECTOR.getSpanItems();
-        assertNotNull(spanItems);
         assertThat(spanItems.size(), is(1));
         SpanData spanData = spanItems.get(0);
         assertThat(spanData.getName(), is("/ShardingSphere/executeSQL/"));
         Attributes attributes = spanData.getAttributes();
-        assertNotNull(attributes);
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.COMPONENT)), is(OpenTelemetryConstants.COMPONENT_NAME));
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.DB_TYPE)), is(OpenTelemetryConstants.DB_TYPE_VALUE));
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.DB_INSTANCE)), is("mock.db"));
@@ -71,13 +68,11 @@ public final class JDBCExecutorCallbackAdviceTest extends AbstractJDBCExecutorCa
         advice.onThrowing(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new IOException());
         advice.afterMethod(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new MethodInvocationResult());
         List<SpanData> spanItems = COLLECTOR.getSpanItems();
-        assertNotNull(spanItems);
         assertThat(spanItems.size(), is(1));
         SpanData spanData = spanItems.get(0);
         assertThat(spanData.getName(), is("/ShardingSphere/executeSQL/"));
         assertThat(spanData.getStatus().getStatusCode(), is(StatusCode.ERROR));
         Attributes attributes = spanData.getAttributes();
-        assertNotNull(attributes);
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.COMPONENT)), is(OpenTelemetryConstants.COMPONENT_NAME));
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.DB_TYPE)), is(OpenTelemetryConstants.DB_TYPE_VALUE));
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.DB_INSTANCE)), is("mock.db"));
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdviceTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdviceTest.java
index 35dfe2c0541..fcf4bc20800 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdviceTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdviceTest.java
@@ -65,10 +65,8 @@ public final class SQLParserEngineAdviceTest extends AbstractSQLParserEngineAdvi
         advice.afterMethod(getTargetObject(), null, new Object[]{SQL_STMT, true}, new MethodInvocationResult());
         parentSpan.end();
         List<SpanData> spanItems = COLLECTOR.getSpanItems();
-        assertNotNull(spanItems);
         assertThat(spanItems.size(), is(2));
         assertThat(spanItems.get(0).getName(), is("/ShardingSphere/parseSQL/"));
-        assertNotNull(spanItems.get(0).getParentSpanId());
         assertNotNull(spanItems.get(0).getParentSpanId(), is(parentSpan.getSpanContext().getSpanId()));
         Attributes attributes = spanItems.get(0).getAttributes();
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.COMPONENT)), is(OpenTelemetryConstants.COMPONENT_NAME));
@@ -83,11 +81,9 @@ public final class SQLParserEngineAdviceTest extends AbstractSQLParserEngineAdvi
         advice.afterMethod(getTargetObject(), null, new Object[]{SQL_STMT, true}, new MethodInvocationResult());
         parentSpan.end();
         List<SpanData> spanItems = COLLECTOR.getSpanItems();
-        assertNotNull(spanItems);
         assertThat(spanItems.size(), is(2));
         assertThat(spanItems.get(0).getName(), is("/ShardingSphere/parseSQL/"));
         assertThat(spanItems.get(0).getStatus().getStatusCode(), is(StatusCode.ERROR));
-        assertNotNull(spanItems.get(0).getParentSpanId());
         assertNotNull(spanItems.get(0).getParentSpanId(), is(parentSpan.getSpanContext().getSpanId()));
         Attributes attributes = spanItems.get(0).getAttributes();
         assertThat(attributes.get(AttributeKey.stringKey(OpenTelemetryConstants.COMPONENT)), is(OpenTelemetryConstants.COMPONENT_NAME));
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/CommandExecutorTaskAdviceTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/CommandExecutorTaskAdviceTest.java
index 2c0b20b818e..56ac0ddcbc3 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/CommandExecutorTaskAdviceTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/CommandExecutorTaskAdviceTest.java
@@ -30,7 +30,6 @@ import java.io.IOException;
 import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class CommandExecutorTaskAdviceTest extends AbstractCommandExecutorTaskAdviceTest {
@@ -50,7 +49,6 @@ public final class CommandExecutorTaskAdviceTest extends AbstractCommandExecutor
         advice.beforeMethod(getTargetObject(), null, new Object[]{}, new MethodInvocationResult());
         advice.afterMethod(getTargetObject(), null, new Object[]{}, new MethodInvocationResult());
         Span span = COLLECTOR.pop();
-        assertNotNull(span);
         Map<String, String> tags = span.tags();
         assertThat(tags.get(ZipkinConstants.Tags.DB_TYPE), is(ZipkinConstants.DB_TYPE_VALUE));
         assertThat(tags.get(ZipkinConstants.Tags.COMPONENT), is(ZipkinConstants.COMPONENT_NAME));
@@ -64,7 +62,6 @@ public final class CommandExecutorTaskAdviceTest extends AbstractCommandExecutor
         advice.onThrowing(getTargetObject(), null, new Object[]{}, new IOException());
         advice.afterMethod(getTargetObject(), null, new Object[]{}, new MethodInvocationResult());
         Span span = COLLECTOR.pop();
-        assertNotNull(span);
         Map<String, String> tags = span.tags();
         assertThat(tags.get("error"), is("IOException"));
         assertThat(tags.get(ZipkinConstants.Tags.DB_TYPE), is(ZipkinConstants.DB_TYPE_VALUE));
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/JDBCExecutorCallbackAdviceTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/JDBCExecutorCallbackAdviceTest.java
index c788f72da4e..a8e867acf31 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/JDBCExecutorCallbackAdviceTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/JDBCExecutorCallbackAdviceTest.java
@@ -31,7 +31,6 @@ import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class JDBCExecutorCallbackAdviceTest extends AbstractJDBCExecutorCallbackAdviceTest {
@@ -52,7 +51,6 @@ public final class JDBCExecutorCallbackAdviceTest extends AbstractJDBCExecutorCa
         advice.beforeMethod(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new MethodInvocationResult());
         advice.afterMethod(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new MethodInvocationResult());
         Span span = COLLECTOR.pop();
-        assertNotNull(span);
         assertThat(span.name(), is("/ShardingSphere/executeSQL/".toLowerCase()));
         Map<String, String> tags = span.tags();
         assertFalse(tags == null || tags.isEmpty());
@@ -70,10 +68,8 @@ public final class JDBCExecutorCallbackAdviceTest extends AbstractJDBCExecutorCa
         advice.onThrowing(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new IOException());
         advice.afterMethod(getTargetObject(), null, new Object[]{getExecutionUnit(), false, getExtraMap()}, new MethodInvocationResult());
         Span span = COLLECTOR.pop();
-        assertNotNull(span);
         assertThat(span.name(), is("/ShardingSphere/executeSQL/".toLowerCase()));
         Map<String, String> tags = span.tags();
-        assertNotNull(tags);
         assertThat(tags.get(ZipkinConstants.Tags.COMPONENT), is("shardingsphere"));
         assertThat(tags.get(ZipkinConstants.Tags.DB_INSTANCE), is("mock.db"));
         assertThat(tags.get(ZipkinConstants.Tags.DB_STATEMENT), is("select 1"));
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/SQLParserEngineAdviceTest.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/SQLParserEngineAdviceTest.java
index 11f50bcf1ed..ff392c5eb70 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/SQLParserEngineAdviceTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/advice/SQLParserEngineAdviceTest.java
@@ -61,10 +61,8 @@ public final class SQLParserEngineAdviceTest extends AbstractSQLParserEngineAdvi
         advice.afterMethod(getTargetObject(), null, new Object[]{SQL_STMT, true}, new MethodInvocationResult());
         parentSpan.finish();
         zipkin2.Span span = COLLECTOR.pop();
-        assertNotNull(span);
         assertNotNull(span.parentId());
         Map<String, String> tags = span.tags();
-        assertNotNull(tags);
         assertThat(tags.get(ZipkinConstants.Tags.DB_TYPE), is(ZipkinConstants.DB_TYPE_VALUE));
         assertThat(tags.get(ZipkinConstants.Tags.COMPONENT), is(ZipkinConstants.COMPONENT_NAME));
     }
@@ -76,10 +74,8 @@ public final class SQLParserEngineAdviceTest extends AbstractSQLParserEngineAdvi
         advice.afterMethod(getTargetObject(), null, new Object[]{SQL_STMT, true}, new MethodInvocationResult());
         parentSpan.finish();
         zipkin2.Span span = COLLECTOR.pop();
-        assertNotNull(span);
         assertNotNull(span.parentId());
         Map<String, String> tags = span.tags();
-        assertNotNull(tags);
         assertThat(tags.get("error"), is("IOException"));
         assertThat(tags.get(ZipkinConstants.Tags.DB_TYPE), is(ZipkinConstants.DB_TYPE_VALUE));
         assertThat(tags.get(ZipkinConstants.Tags.COMPONENT), is(ZipkinConstants.COMPONENT_NAME));
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLArrayParameterDecoderTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLArrayParameterDecoderTest.java
index 260dcba7c61..9ea0022629b 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLArrayParameterDecoderTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLArrayParameterDecoderTest.java
@@ -21,7 +21,6 @@ import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -37,7 +36,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseInt2ArrayNormalTextMode() {
         short[] result = DECODER.decodeInt2Array(INT_ARRAY_STR.getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertThat(result[0], is((short) 11));
         assertThat(result[1], is((short) 12));
@@ -46,7 +44,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseInt4ArrayNormalTextMode() {
         int[] result = DECODER.decodeInt4Array(INT_ARRAY_STR.getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertThat(result[0], is(11));
         assertThat(result[1], is(12));
@@ -55,7 +52,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseInt8ArrayNormalTextMode() {
         long[] result = DECODER.decodeInt8Array(INT_ARRAY_STR.getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertThat(result[0], is(11L));
         assertThat(result[1], is(12L));
@@ -64,7 +60,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseFloat4ArrayNormalTextMode() {
         float[] result = DECODER.decodeFloat4Array(FLOAT_ARRAY_STR.getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertThat(Float.compare(result[0], 11.1F), is(0));
         assertThat(Float.compare(result[1], 12.1F), is(0));
@@ -73,7 +68,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseFloat8ArrayNormalTextMode() {
         double[] result = DECODER.decodeFloat8Array(FLOAT_ARRAY_STR.getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertThat(Double.compare(result[0], 11.1D), is(0));
         assertThat(Double.compare(result[1], 12.1D), is(0));
@@ -82,7 +76,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseBoolArrayNormalTextMode() {
         boolean[] result = DECODER.decodeBoolArray("{\"true\",\"false\"}".getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertTrue(result[0]);
         assertFalse(result[1]);
@@ -91,7 +84,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseStringArrayNormalTextMode() {
         String[] result = DECODER.decodeStringArray("{\"a\",\"b\"}".getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(2));
         assertThat(result[0], is("a"));
         assertThat(result[1], is("b"));
@@ -100,7 +92,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseStringArrayWithEscapeTextMode() {
         String[] result = DECODER.decodeStringArray("{\"\\\"a\",\"\\\\b\",\"c\"}".getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(3));
         assertThat(result[0], is("\"a"));
         assertThat(result[1], is("\\b"));
@@ -110,7 +101,6 @@ public final class PostgreSQLArrayParameterDecoderTest {
     @Test
     public void assertParseStringArrayWithNullTextMode() {
         String[] result = DECODER.decodeStringArray("{\"a\",\"b\",NULL}".getBytes(), false);
-        assertNotNull(result);
         assertThat(result.length, is(3));
         assertThat(result[0], is("a"));
         assertThat(result[1], is("b"));
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java
index 43d8dec0629..e39ca528e10 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLBoolArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLBoolArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new boolean[]{true, false}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java
index e256293e6eb..dbb1250dbee 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLFloat4ArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLFloat4ArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new float[]{11.1F, 12.1F}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java
index 417914f7753..a911c94bf6f 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLFloat8ArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLFloat8ArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new double[]{11.1D, 12.1D}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java
index bba178a5af2..4b62d6e6c3a 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLInt2ArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLInt2ArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new short[]{11, 12}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java
index d5b6f19cfef..38d46742383 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLInt4ArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLInt4ArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new int[]{11, 12}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java
index f59e2da7437..76f882bed4c 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLInt8ArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLInt8ArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new long[]{11, 12}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java
index f6f21f1d8ef..a9befae0926 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java
@@ -31,9 +31,7 @@ import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
 
 @RunWith(Parameterized.class)
 @RequiredArgsConstructor
@@ -68,8 +66,6 @@ public final class PostgreSQLNumericBinaryProtocolValueTest {
         byteBuf.writeBytes(expected);
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = binaryProtocolValue.read(payload, expectedLength);
-        assertNotNull(result);
-        assertTrue(result instanceof BigDecimal);
         assertThat(result, is(bigDecimal));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java
index f654065ab25..9aedc93affc 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 import java.nio.charset.StandardCharsets;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class PostgreSQLStringArrayBinaryProtocolValueTest {
@@ -49,7 +48,6 @@ public final class PostgreSQLStringArrayBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = newInstance().read(payload, parameterValue.length());
-        assertNotNull(result);
         assertThat(result, is(new String[]{"a", "b"}));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLUnspecifiedBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLUnspecifiedBinaryProtocolValueTest.java
index b8307a3db8a..87a7f9aa4c3 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLUnspecifiedBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLUnspecifiedBinaryProtocolValueTest.java
@@ -25,10 +25,9 @@ import org.junit.Test;
 
 import java.nio.charset.StandardCharsets;
 
+import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 
 public final class PostgreSQLUnspecifiedBinaryProtocolValueTest {
@@ -48,8 +47,7 @@ public final class PostgreSQLUnspecifiedBinaryProtocolValueTest {
         byteBuf.readInt();
         PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
         Object result = new PostgreSQLUnspecifiedBinaryProtocolValue().read(payload, timestampStr.length());
-        assertNotNull(result);
-        assertTrue(result instanceof PostgreSQLTypeUnspecifiedSQLParameter);
+        assertThat(result, instanceOf(PostgreSQLTypeUnspecifiedSQLParameter.class));
         assertThat(result.toString(), is(timestampStr));
         assertThat(byteBuf.readerIndex(), is(expectedLength));
     }
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/parse/PostgreSQLComParsePacketTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/parse/PostgreSQLComParsePacketTest.java
index 5546183a993..de2be14b49a 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/parse/PostgreSQLComParsePacketTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/parse/PostgreSQLComParsePacketTest.java
@@ -17,8 +17,8 @@
 
 package org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.extended.parse;
 
-import org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.extended.PostgreSQLColumnType;
 import org.apache.shardingsphere.db.protocol.postgresql.packet.command.PostgreSQLCommandPacketType;
+import org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.extended.PostgreSQLColumnType;
 import org.apache.shardingsphere.db.protocol.postgresql.payload.PostgreSQLPacketPayload;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -27,9 +27,7 @@ import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.List;
 
-import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.when;
 
@@ -50,8 +48,7 @@ public final class PostgreSQLComParsePacketTest {
         assertThat(actual.getSql(), is("sql"));
         assertThat(actual.getStatementId(), is("sql"));
         List<PostgreSQLColumnType> types = actual.readParameterTypes();
-        assertNotNull(types);
-        assertThat(types.size(), equalTo(1));
+        assertThat(types.size(), is(1));
         assertThat(types.get(0), is(PostgreSQLColumnType.POSTGRESQL_TYPE_UNSPECIFIED));
     }
 }
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
index f7457ebc4a4..5819c437986 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
@@ -31,7 +31,6 @@ import java.util.Map;
 import java.util.Properties;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -49,8 +48,6 @@ public final class DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwappe
     @Test
     public void assertSwapToObject() {
         AlgorithmProvidedDatabaseDiscoveryRuleConfiguration actual = swapper.swapToObject(createYamlRuleConfiguration());
-        assertNotNull(actual);
-        assertNotNull(actual.getDataSources());
         assertTrue(actual.getDataSources().iterator().hasNext());
         DatabaseDiscoveryDataSourceRuleConfiguration ruleConfig = actual.getDataSources().iterator().next();
         assertThat(ruleConfig.getGroupName(), is("name"));
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java
index c7e46b767c3..d287c3638da 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java
@@ -32,7 +32,6 @@ import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 @ContextConfiguration(locations = "classpath:META-INF/spring/database-discovery-application-context.xml")
@@ -52,14 +51,12 @@ public final class DatabaseDiscoverySpringNamespaceTest extends AbstractJUnit4Sp
     private void assertDiscoveryTypes(final Map<String, DatabaseDiscoveryProviderAlgorithm> discoveryTypes) {
         assertThat(discoveryTypes.size(), is(1));
         assertThat(discoveryTypes.get("mgr"), instanceOf(MGRMySQLDatabaseDiscoveryProviderAlgorithm.class));
-        assertNotNull(discoveryTypes.get("mgr").getProps());
         assertThat(discoveryTypes.get("mgr").getProps().get("group-name"), is("92504d5b-6dec-11e8-91ea-246e9612aaf1"));
     }
     
     private void assertHeartbeats(final Map<String, DatabaseDiscoveryHeartBeatConfiguration> heartbeats) {
         assertThat(heartbeats.size(), is(1));
         assertThat(heartbeats.get("mgr-heartbeat"), instanceOf(DatabaseDiscoveryHeartBeatConfiguration.class));
-        assertNotNull(heartbeats.get("mgr-heartbeat").getProps());
         assertThat(heartbeats.get("mgr-heartbeat").getProps().get("keep-alive-cron"), is("0/5 * * * * ?"));
     }
     
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/impl/DecoratedEncryptColumnsMergedResultTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/impl/DecoratedEncryptColumnsMergedResultTest.java
index 53b4731e130..c86e375d9a0 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/impl/DecoratedEncryptColumnsMergedResultTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/impl/DecoratedEncryptColumnsMergedResultTest.java
@@ -30,7 +30,6 @@ import java.util.Collections;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
@@ -52,7 +51,6 @@ public final class DecoratedEncryptColumnsMergedResultTest {
         when(mergedResult.wasNull()).thenReturn(false);
         when(mergedResult.getValue(1, getClass())).thenReturn("test");
         DecoratedEncryptColumnsMergedResult actual = new DecoratedEncryptColumnsMergedResult(mergedResult, testStatementContext, mock(EncryptRule.class));
-        assertNotNull(actual);
         assertTrue(actual.nextValue());
         assertFalse(actual.wasNull());
         assertThat(actual.getOriginalValue(1, getClass()), is("test"));
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilderTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilderTest.java
index 080f36fcbc9..824e81d8da6 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilderTest.java
@@ -39,7 +39,6 @@ import java.util.Iterator;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
@@ -87,7 +86,6 @@ public final class EncryptTokenGenerateBuilderTest {
     private void assertField(final SQLTokenGenerator sqlTokenGenerator, final Object filedInstance, final String fieldName) throws IllegalAccessException {
         Field field = findField(sqlTokenGenerator.getClass(), fieldName, filedInstance.getClass());
         field.setAccessible(true);
-        assertNotNull(field.get(sqlTokenGenerator));
         assertThat(field.get(sqlTokenGenerator), is(filedInstance));
     }
     
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java
index ea49ecb2ddf..7bc89ee6258 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java
@@ -30,7 +30,6 @@ import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class EncryptTableRuleConfigurationYamlSwapperTest {
@@ -45,9 +44,7 @@ public final class EncryptTableRuleConfigurationYamlSwapperTest {
                 new EncryptColumnRuleConfiguration("encrypt_column_3", "encrypt_cipher_3", "", "", "test_encryptor_3"));
         EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("test_table", encryptColumnRuleConfigs, null);
         YamlEncryptTableRuleConfiguration actualYamlEncryptTableRuleConfig = tableRuleConfigYamlSwapper.swapToYamlConfiguration(encryptTableRuleConfig);
-        assertNotNull(actualYamlEncryptTableRuleConfig);
         Map<String, YamlEncryptColumnRuleConfiguration> actualColumns = actualYamlEncryptTableRuleConfig.getColumns();
-        assertFalse(actualColumns.isEmpty());
         assertThat(actualColumns.size(), is(3));
         YamlEncryptColumnRuleConfiguration actualYamlEncryptColumnRuleConfigFirst = actualColumns.get("encrypt_column_1");
         assertThat(actualYamlEncryptColumnRuleConfigFirst.getCipherColumn(), is("encrypt_cipher_1"));
@@ -74,7 +71,6 @@ public final class EncryptTableRuleConfigurationYamlSwapperTest {
         yamlEncryptTableRuleConfig.setName("test_table");
         yamlEncryptTableRuleConfig.setColumns(columns);
         EncryptTableRuleConfiguration actualEncryptTableRuleConfig = tableRuleConfigYamlSwapper.swapToObject(yamlEncryptTableRuleConfig);
-        assertNotNull(actualEncryptTableRuleConfig);
         assertThat(actualEncryptTableRuleConfig.getName(), is("test_table"));
         Collection<EncryptColumnRuleConfiguration> actualColumns = actualEncryptTableRuleConfig.getColumns();
         assertFalse(actualColumns.isEmpty());
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/converter/EncryptRuleStatementConverterTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/converter/EncryptRuleStatementConverterTest.java
index 1478f8cb9aa..58cad89e18d 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/converter/EncryptRuleStatementConverterTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/converter/EncryptRuleStatementConverterTest.java
@@ -28,7 +28,6 @@ import java.util.Collections;
 import java.util.Properties;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class EncryptRuleStatementConverterTest {
@@ -36,7 +35,6 @@ public final class EncryptRuleStatementConverterTest {
     @Test
     public void assertCovert() {
         EncryptRuleConfiguration ruleConfig = EncryptRuleStatementConverter.convert(Collections.singleton(new EncryptRuleSegment("t_encrypt", buildColumns(), null)));
-        assertNotNull(ruleConfig);
         assertThat(ruleConfig.getTables().iterator().next().getName(), is("t_encrypt"));
         assertThat(ruleConfig.getTables().iterator().next().getColumns().iterator().next().getLogicColumn(), is("user_id"));
         assertThat(ruleConfig.getTables().iterator().next().getColumns().iterator().next().getCipherColumn(), is("user_cipher"));
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingRuleTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingRuleTest.java
index 00f1525fd0c..eff0ecdf50e 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingRuleTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingRuleTest.java
@@ -35,7 +35,6 @@ import java.util.Properties;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNotNull;
 
 public final class ReadwriteSplittingRuleTest {
     
@@ -68,7 +67,6 @@ public final class ReadwriteSplittingRuleTest {
     
     private void assertDataSourceRule(final ReadwriteSplittingDataSourceRule actual) {
         assertThat(actual.getName(), is("test_pr"));
-        assertNotNull(actual.getReadwriteSplittingStrategy().getWriteDataSource());
         assertThat(actual.getReadwriteSplittingStrategy().getWriteDataSource(), is("write_ds"));
         assertThat(actual.getReadwriteSplittingStrategy().getReadDataSources(), is(Arrays.asList("read_ds_0", "read_ds_1")));
         assertThat(actual.getLoadBalancer().getType(), is("RANDOM"));
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java
index 064eaf684be..17637ba1284 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java
@@ -29,7 +29,6 @@ import java.util.Collections;
 import java.util.Properties;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -40,30 +39,21 @@ public final class ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapp
     @Test
     public void assertSwapToYamlConfiguration() {
         YamlReadwriteSplittingRuleConfiguration actual = createYamlReadwriteSplittingRuleConfiguration();
-        assertNotNull(actual);
-        assertNotNull(actual.getDataSources());
         assertThat(actual.getDataSources().keySet(), is(Collections.singleton("name")));
         Properties props = actual.getDataSources().get("name").getProps();
-        assertNotNull(props);
         assertThat(props.getProperty("write-data-source-name"), is("writeDataSourceName"));
         assertThat(props.getProperty("read-data-source-names"), is("readDataSourceName"));
         assertThat(actual.getDataSources().get("name").getLoadBalancerName(), is("loadBalancerName"));
-        assertNotNull(actual.getLoadBalancers());
         assertThat(actual.getLoadBalancers().keySet(), is(Collections.singleton("name")));
-        assertNotNull(actual.getLoadBalancers().get("name"));
         assertThat(actual.getLoadBalancers().get("name").getType(), is("RANDOM"));
     }
     
     @Test
     public void assertSwapToObject() {
         AlgorithmProvidedReadwriteSplittingRuleConfiguration actual = swapper.swapToObject(createYamlReadwriteSplittingRuleConfiguration());
-        assertNotNull(actual);
-        assertNotNull(actual.getDataSources());
         assertTrue(actual.getDataSources().iterator().hasNext());
         ReadwriteSplittingDataSourceRuleConfiguration ruleConfig = actual.getDataSources().iterator().next();
-        assertNotNull(ruleConfig);
         assertThat(ruleConfig.getName(), is("name"));
-        assertNotNull(ruleConfig.getProps());
         assertThat(ruleConfig.getProps().getProperty("write-data-source-name"), is("writeDataSourceName"));
         assertThat(ruleConfig.getProps().getProperty("read-data-source-names"), is("readDataSourceName"));
         assertThat(ruleConfig.getLoadBalancerName(), is("loadBalancerName"));
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java
index 88d34bd75a2..000da2a6529 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java
@@ -32,7 +32,6 @@ import java.util.Optional;
 import java.util.Properties;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -45,7 +44,6 @@ public final class ReadwriteSplittingRuleConfigurationYamlSwapperTest {
                 new ReadwriteSplittingDataSourceRuleConfiguration("ds", "Static", getProperties(), "roundRobin");
         YamlReadwriteSplittingRuleConfiguration actual = getReadwriteSplittingRuleConfigurationYamlSwapper().swapToYamlConfiguration(new ReadwriteSplittingRuleConfiguration(
                 Collections.singleton(dataSourceConfig), ImmutableMap.of("roundRobin", new ShardingSphereAlgorithmConfiguration("ROUND_ROBIN", new Properties()))));
-        assertNotNull(actual.getDataSources().get("ds").getProps());
         assertThat(actual.getDataSources().get("ds").getProps().getProperty("write-data-source-name"), is("write"));
         assertThat(actual.getDataSources().get("ds").getProps().getProperty("read-data-source-names"), is("read"));
         assertThat(actual.getDataSources().get("ds").getLoadBalancerName(), is("roundRobin"));
@@ -56,7 +54,6 @@ public final class ReadwriteSplittingRuleConfigurationYamlSwapperTest {
         ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfig = new ReadwriteSplittingDataSourceRuleConfiguration("ds", "Static", getProperties(), null);
         YamlReadwriteSplittingRuleConfiguration actual = getReadwriteSplittingRuleConfigurationYamlSwapper().swapToYamlConfiguration(
                 new ReadwriteSplittingRuleConfiguration(Collections.singleton(dataSourceConfig), Collections.emptyMap()));
-        assertNotNull(actual.getDataSources().get("ds").getProps());
         assertThat(actual.getDataSources().get("ds").getProps().getProperty("write-data-source-name"), is("write"));
         assertThat(actual.getDataSources().get("ds").getProps().getProperty("read-data-source-names"), is("read"));
         assertNull(actual.getDataSources().get("ds").getLoadBalancerName());
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/YamlRootRuleConfigurationsForYamlReadwriteSplittingRuleConfigurationTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/YamlRootRuleConfigurationsForYamlReadwriteSplittingRuleConfiguration [...]
index 532f1cae4a9..e79b90b0113 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/YamlRootRuleConfigurationsForYamlReadwriteSplittingRuleConfigurationTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/test/java/org/apache/shardingsphere/readwritesplitting/swapper/YamlRootRuleConfigurationsForYamlReadwriteSplittingRuleConfigurationTest.java
@@ -69,14 +69,12 @@ public final class YamlRootRuleConfigurationsForYamlReadwriteSplittingRuleConfig
     
     private void assertReadwriteSplittingRuleForDs0(final YamlReadwriteSplittingRuleConfiguration actual) {
         assertThat(actual.getDataSources().get("ds_0").getType(), is("Static"));
-        assertNotNull(actual.getDataSources().get("ds_0").getProps());
         assertThat(actual.getDataSources().get("ds_0").getProps().getProperty("write-data-source-name"), is("write_ds_0"));
         assertThat(actual.getDataSources().get("ds_0").getLoadBalancerName(), is("roundRobin"));
     }
     
     private void assertReadwriteSplittingRuleForDs1(final YamlReadwriteSplittingRuleConfiguration actual) {
         assertThat(actual.getDataSources().get("ds_1").getType(), is("Static"));
-        assertNotNull(actual.getDataSources().get("ds_1").getProps());
         assertThat(actual.getDataSources().get("ds_1").getProps().getProperty("write-data-source-name"), is("write_ds_1"));
         assertThat(actual.getDataSources().get("ds_1").getLoadBalancerName(), is("random"));
     }
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-boot-starter/src/test/java/org/apache/shardingsphere/readwritesplitting/spring/boot/ReadwriteSplittingSpringBootStarterTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-boot-starter/src/test/java/org/apache/shardingsphere/readwrites [...]
index de1d8466b93..4529f90fb06 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-boot-starter/src/test/java/org/apache/shardingsphere/readwritesplitting/spring/boot/ReadwriteSplittingSpringBootStarterTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-boot-starter/src/test/java/org/apache/shardingsphere/readwritesplitting/spring/boot/ReadwriteSplittingSpringBootStarterTest.java
@@ -17,8 +17,8 @@
 
 package org.apache.shardingsphere.readwritesplitting.spring.boot;
 
-import org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReplicaLoadBalanceAlgorithm;
 import org.apache.shardingsphere.readwritesplitting.algorithm.config.AlgorithmProvidedReadwriteSplittingRuleConfiguration;
+import org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReplicaLoadBalanceAlgorithm;
 import org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceRuleConfiguration;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -32,7 +32,6 @@ import javax.annotation.Resource;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNotNull;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @SpringBootTest(classes = ReadwriteSplittingSpringBootStarterTest.class)
@@ -58,7 +57,6 @@ public class ReadwriteSplittingSpringBootStarterTest {
         ReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfig = config.getDataSources().stream().findFirst().get();
         assertThat(dataSourceRuleConfig.getName(), is("readwrite_ds"));
         assertThat(dataSourceRuleConfig.getType(), is("Static"));
-        assertNotNull(dataSourceRuleConfig.getProps());
         assertThat(dataSourceRuleConfig.getProps().get("write-data-source-name"), is("write_ds"));
         assertThat(dataSourceRuleConfig.getProps().get("read-data-source-names"), is("read_ds_0,read_ds_1"));
         assertThat(dataSourceRuleConfig.getLoadBalancerName(), is("random"));
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-namespace/src/test/java/org/apache/shardingsphere/readwritesplitting/spring/namespace/ReadwriteSplittingSpringNamespaceTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-namespace/src/test/java/org/apache/shardingsphere/readwritespli [...]
index 40a0cff96b0..199159bea92 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-namespace/src/test/java/org/apache/shardingsphere/readwritesplitting/spring/namespace/ReadwriteSplittingSpringNamespaceTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-spring/shardingsphere-readwrite-splitting-spring-namespace/src/test/java/org/apache/shardingsphere/readwritesplitting/spring/namespace/ReadwriteSplittingSpringNamespaceTest.java
@@ -17,8 +17,8 @@
 
 package org.apache.shardingsphere.readwritesplitting.spring.namespace;
 
-import org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReplicaLoadBalanceAlgorithm;
 import org.apache.shardingsphere.readwritesplitting.algorithm.config.AlgorithmProvidedReadwriteSplittingRuleConfiguration;
+import org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReplicaLoadBalanceAlgorithm;
 import org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceRuleConfiguration;
 import org.apache.shardingsphere.readwritesplitting.spi.ReplicaLoadBalanceAlgorithm;
 import org.junit.Test;
@@ -30,7 +30,6 @@ import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 @ContextConfiguration(locations = "classpath:META-INF/spring/readwrite-splitting-application-context.xml")
@@ -64,7 +63,6 @@ public final class ReadwriteSplittingSpringNamespaceTest extends AbstractJUnit4S
     
     private void assertDefaultDataSourceRule(final ReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfig) {
         assertThat(dataSourceRuleConfig.getName(), is("default_ds"));
-        assertNotNull(dataSourceRuleConfig.getProps());
         assertThat(dataSourceRuleConfig.getProps().getProperty("write-data-source-name"), is("write_ds"));
         assertThat(dataSourceRuleConfig.getProps().getProperty("read-data-source-names"), is("read_ds_0, read_ds_1"));
         assertThat(dataSourceRuleConfig.getLoadBalancerName(), is(""));
@@ -79,7 +77,6 @@ public final class ReadwriteSplittingSpringNamespaceTest extends AbstractJUnit4S
     
     private void assertRandomDataSourceRule(final ReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfig) {
         assertThat(dataSourceRuleConfig.getName(), is("random_ds"));
-        assertNotNull(dataSourceRuleConfig.getProps());
         assertThat(dataSourceRuleConfig.getProps().getProperty("write-data-source-name"), is("write_ds"));
         assertThat(dataSourceRuleConfig.getProps().getProperty("read-data-source-names"), is("read_ds_0, read_ds_1"));
         assertThat(dataSourceRuleConfig.getLoadBalancerName(), is("randomLoadbalancer"));
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleAlgorithmProviderConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleAlgorithmProviderConfigurationYamlSwapperTest.java
index 65a52596dd9..09377f7adc9 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleAlgorithmProviderConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleAlgorithmProviderConfigurationYamlSwapperTest.java
@@ -33,7 +33,6 @@ import java.util.Arrays;
 import java.util.Collections;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class ShadowRuleAlgorithmProviderConfigurationYamlSwapperTest {
@@ -51,18 +50,15 @@ public final class ShadowRuleAlgorithmProviderConfigurationYamlSwapperTest {
         YamlShadowRuleConfiguration actual = swapper.swapToYamlConfiguration(expected);
         actual.getDataSources().forEach((key, value) -> {
             ShadowDataSourceConfiguration dataSourceConfig = expected.getDataSources().get(key);
-            assertNotNull(dataSourceConfig);
             assertThat(value.getShadowDataSourceName(), is(dataSourceConfig.getShadowDataSourceName()));
             assertThat(value.getSourceDataSourceName(), is(dataSourceConfig.getSourceDataSourceName()));
         });
         actual.getTables().forEach((key, value) -> {
             ShadowTableConfiguration shadowTableConfig = expected.getTables().get(key);
-            assertNotNull(shadowTableConfig);
             assertThat(value.getShadowAlgorithmNames(), is(shadowTableConfig.getShadowAlgorithmNames()));
         });
         actual.getShadowAlgorithms().forEach((key, value) -> {
             ShadowAlgorithm shadowAlgorithm = expected.getShadowAlgorithms().get(key);
-            assertNotNull(shadowAlgorithm);
             assertThat(value.getType(), is(shadowAlgorithm.getType()));
         });
     }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ShardingTokenGenerateBuilderTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ShardingTokenGenerateBuilderTest.java
index e44949015f4..81d07a6b34f 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ShardingTokenGenerateBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ShardingTokenGenerateBuilderTest.java
@@ -36,7 +36,6 @@ import java.util.Iterator;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
@@ -89,7 +88,6 @@ public final class ShardingTokenGenerateBuilderTest {
     private void assertField(final SQLTokenGenerator sqlTokenGenerator, final Object filedInstance, final String fieldName) throws Exception {
         Field field = sqlTokenGenerator.getClass().getDeclaredField(fieldName);
         field.setAccessible(true);
-        assertNotNull(field.get(sqlTokenGenerator));
         assertThat(field.get(sqlTokenGenerator), is(filedInstance));
     }
 }
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/SQLStatementContextFactoryTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/SQLStatementContextFactoryTest.java
index bd44fcabdbc..2fc7588ecea 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/SQLStatementContextFactoryTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/SQLStatementContextFactoryTest.java
@@ -46,8 +46,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 
@@ -60,8 +60,7 @@ public final class SQLStatementContextFactoryTest {
         selectStatement.setLimit(new LimitSegment(0, 10, null, null));
         selectStatement.setProjections(projectionsSegment);
         SQLStatementContext<?> sqlStatementContext = SQLStatementContextFactory.newInstance(mockMetaDataMap(), Collections.emptyList(), selectStatement, DefaultSchema.LOGIC_NAME);
-        assertNotNull(sqlStatementContext);
-        assertTrue(sqlStatementContext instanceof SelectStatementContext);
+        assertThat(sqlStatementContext, instanceOf(SelectStatementContext.class));
     }
     
     @Test
@@ -98,15 +97,13 @@ public final class SQLStatementContextFactoryTest {
     private void assertSQLStatementContextCreatedWhenSQLStatementInstanceOfInsertStatement(final InsertStatement insertStatement) {
         insertStatement.setTable(new SimpleTableSegment(new TableNameSegment(0, 0, new IdentifierValue("tbl"))));
         SQLStatementContext<?> sqlStatementContext = SQLStatementContextFactory.newInstance(mockMetaDataMap(), Collections.emptyList(), insertStatement, DefaultSchema.LOGIC_NAME);
-        assertNotNull(sqlStatementContext);
-        assertTrue(sqlStatementContext instanceof InsertStatementContext);
+        assertThat(sqlStatementContext, instanceOf(InsertStatementContext.class));
     }
     
     @Test
     public void assertSQLStatementContextCreatedWhenSQLStatementNotInstanceOfSelectStatementAndInsertStatement() {
         SQLStatementContext<?> sqlStatementContext = SQLStatementContextFactory.newInstance(mockMetaDataMap(), Collections.emptyList(), mock(MySQLStatement.class), DefaultSchema.LOGIC_NAME);
-        assertNotNull(sqlStatementContext);
-        assertTrue(sqlStatementContext instanceof CommonSQLStatementContext);
+        assertThat(sqlStatementContext, instanceOf(CommonSQLStatementContext.class));
     }
     
     private Map<String, ShardingSphereMetaData> mockMetaDataMap() {
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java
index 717c753cff4..04b20a55333 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java
@@ -57,7 +57,6 @@ import java.util.Optional;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -182,9 +181,7 @@ public final class InsertStatementContextTest {
     }
     
     private void assertInsertStatementContext(final InsertStatementContext actual) {
-        assertNotNull(actual.getTablesContext());
         assertThat(actual.getTablesContext().getTableNames(), is(Sets.newLinkedHashSet(Collections.singletonList("tbl"))));
-        assertNotNull(actual.getAllTables());
         assertThat(actual.getAllTables().size(), is(1));
         SimpleTableSegment simpleTableSegment = actual.getAllTables().iterator().next();
         assertThat(simpleTableSegment.getTableName().getStartIndex(), is(0));
@@ -196,6 +193,12 @@ public final class InsertStatementContextTest {
         assertThat(actual.getGeneratedKeyContext(), is(Optional.empty()));
         assertThat(actual.getColumnNames(), is(Arrays.asList("id", "name", "status")));
         assertThat(actual.getInsertValueContexts().size(), is(2));
+        assertTrue(actual.getInsertValueContexts().get(0).getValue(0).isPresent());
+        assertTrue(actual.getInsertValueContexts().get(0).getValue(1).isPresent());
+        assertTrue(actual.getInsertValueContexts().get(0).getValue(2).isPresent());
+        assertTrue(actual.getInsertValueContexts().get(1).getValue(0).isPresent());
+        assertTrue(actual.getInsertValueContexts().get(1).getValue(1).isPresent());
+        assertTrue(actual.getInsertValueContexts().get(1).getValue(2).isPresent());
         assertThat(actual.getInsertValueContexts().get(0).getValue(0).get(), is(1));
         assertThat(actual.getInsertValueContexts().get(0).getValue(1).get(), is("Tom"));
         assertThat(actual.getInsertValueContexts().get(0).getValue(2).get(), is("init"));
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeTest.java
index 49768ab4f4f..61950a69f93 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeTest.java
@@ -23,7 +23,6 @@ import org.junit.Test;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class DataNodeTest {
@@ -57,7 +56,6 @@ public final class DataNodeTest {
         assertThat(dataNode, is(dataNode));
         assertThat(dataNode, not(new DataNode("ds_0.tbl_1")));
         assertFalse(dataNode.equals(null));
-        assertNotNull(dataNode);
     }
     
     @Test
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesTest.java
index 34f0f005f99..82b729a1823 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesTest.java
@@ -33,7 +33,6 @@ import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -68,7 +67,6 @@ public final class DataSourcePropertiesTest {
     public void assertGetAllLocalProperties() {
         DataSourceProperties originalDataSourceProps = new DataSourceProperties(MockedDataSource.class.getName(), getProperties());
         Map<String, Object> actualAllProps = originalDataSourceProps.getAllLocalProperties();
-        assertNotNull(actualAllProps);
         assertThat(actualAllProps.size(), is(7));
         assertTrue(actualAllProps.containsKey("driverClassName"));
         assertTrue(actualAllProps.containsValue(MockedDataSource.class.getName()));
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/resource/DataSourcesMetaDataTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/resource/DataSourcesMetaDataTest.java
index a143c7fc47b..5a53c292652 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/resource/DataSourcesMetaDataTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/resource/DataSourcesMetaDataTest.java
@@ -27,7 +27,6 @@ import java.util.HashMap;
 import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -41,9 +40,9 @@ public final class DataSourcesMetaDataTest {
         dataSourceMap.put("ds_1", createDataSource("jdbc:mysql://127.0.0.1:3307/db_1"));
         DataSourcesMetaData dataSourcesMetaData = new DataSourcesMetaData(DatabaseTypeRegistry.getActualDatabaseType("MySQL"), dataSourceMap);
         Collection<String> allInstanceDataSourceNames = dataSourcesMetaData.getAllInstanceDataSourceNames();
-        assertNotNull(allInstanceDataSourceNames);
         assertThat(allInstanceDataSourceNames.size(), is(2));
-        assertTrue(allInstanceDataSourceNames.contains("ds_0") && allInstanceDataSourceNames.contains("ds_1"));
+        assertTrue(allInstanceDataSourceNames.contains("ds_0"));
+        assertTrue(allInstanceDataSourceNames.contains("ds_1"));
     }
     
     @Test
@@ -53,7 +52,6 @@ public final class DataSourcesMetaDataTest {
         dataSourceMap.put("ds_1", createDataSource("jdbc:mysql://127.0.0.1:3306/db_1"));
         DataSourcesMetaData dataSourcesMetaData = new DataSourcesMetaData(DatabaseTypeRegistry.getActualDatabaseType("MySQL"), dataSourceMap);
         Collection<String> allInstanceDataSourceNames = dataSourcesMetaData.getAllInstanceDataSourceNames();
-        assertNotNull(allInstanceDataSourceNames);
         assertThat(allInstanceDataSourceNames.size(), is(1));
         assertTrue(allInstanceDataSourceNames.contains("ds_0") || allInstanceDataSourceNames.contains("ds_1"));
     }
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/schema/swapper/SchemaYamlSwapperTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/schema/swapper/SchemaYamlSwapperTest.java
index fa7fc8d50a1..182bc21e57c 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/schema/swapper/SchemaYamlSwapperTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/schema/swapper/SchemaYamlSwapperTest.java
@@ -35,7 +35,6 @@ import java.util.stream.Collectors;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -49,7 +48,6 @@ public final class SchemaYamlSwapperTest {
     public void assertSwapToYamlSchema() {
         ShardingSphereSchema schema = new SchemaYamlSwapper().swapToObject(YamlEngine.unmarshal(readYAML(YAML), YamlSchema.class));
         YamlSchema yamlSchema = new SchemaYamlSwapper().swapToYamlConfiguration(schema);
-        assertNotNull(yamlSchema);
         assertThat(yamlSchema.getTables().keySet(), is(Collections.singleton("t_order")));
         YamlTableMetaData yamlTableMetaData = yamlSchema.getTables().get("t_order");
         assertThat(yamlTableMetaData.getIndexes().keySet(), is(Collections.singleton("primary")));
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/SQLTokenGeneratorsTest.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/SQLTokenGeneratorsTest.java
index 55408f7f7a7..e72c29e133c 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/SQLTokenGeneratorsTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/SQLTokenGeneratorsTest.java
@@ -17,12 +17,11 @@
 
 package org.apache.shardingsphere.infra.rewrite.sql.token.generator;
 
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
 import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.rewrite.sql.token.pojo.SQLToken;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.lang.reflect.Field;
@@ -31,11 +30,9 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
@@ -72,15 +69,6 @@ public final class SQLTokenGeneratorsTest {
         assertThat(actualSqlTokenGenerator, is(expectedSqlTokenGenerator));
     }
     
-    @Test
-    public void assertAddAllWithEmptyList() throws Exception {
-        SQLTokenGenerators sqlTokenGenerators = new SQLTokenGenerators();
-        sqlTokenGenerators.addAll(Collections.emptyList());
-        Map<Class<?>, SQLTokenGenerator> actualSqlTokenGeneratorsMap = getSqlTokenGeneratorsMap(sqlTokenGenerators);
-        assertNotNull(actualSqlTokenGeneratorsMap);
-        assertTrue(actualSqlTokenGeneratorsMap.isEmpty());
-    }
-    
     @Test
     @SuppressWarnings({"unchecked", "rawtypes"})
     public void assertGenerateSQLTokensWithOptionalSQLTokenGenerator() {
@@ -90,7 +78,6 @@ public final class SQLTokenGeneratorsTest {
         SQLToken expectedToken = mock(SQLToken.class);
         when(optionalSQLTokenGenerator.generateSQLToken(any(SQLStatementContext.class))).thenReturn(expectedToken);
         Collection<SQLToken> actualSqlTokens = sqlTokenGenerators.generateSQLTokens("sharding_db", mockSchemaMap(), mock(SQLStatementContext.class), Collections.emptyList());
-        assertNotNull(actualSqlTokens);
         assertThat(actualSqlTokens.size(), is(1));
         assertThat(actualSqlTokens.iterator().next(), is(expectedToken));
     }
@@ -101,12 +88,11 @@ public final class SQLTokenGeneratorsTest {
         CollectionSQLTokenGenerator<SQLStatementContext<?>> collectionSQLTokenGenerator = mock(CollectionSQLTokenGenerator.class);
         SQLTokenGenerators sqlTokenGenerators = new SQLTokenGenerators();
         sqlTokenGenerators.addAll(Collections.singleton(collectionSQLTokenGenerator));
-        List<SQLToken> expectedCollection = Arrays.asList(mock(SQLToken.class), mock(SQLToken.class));
-        doReturn(expectedCollection).when(collectionSQLTokenGenerator).generateSQLTokens(any());
-        List<SQLToken> actualSqlTokens = sqlTokenGenerators.generateSQLTokens("sharding_db", mockSchemaMap(), mock(SQLStatementContext.class), Collections.emptyList());
-        assertNotNull(actualSqlTokens);
-        assertThat(actualSqlTokens.size(), is(2));
-        assertThat(actualSqlTokens, is(expectedCollection));
+        Collection<SQLToken> expectedSQLTokens = Arrays.asList(mock(SQLToken.class), mock(SQLToken.class));
+        doReturn(expectedSQLTokens).when(collectionSQLTokenGenerator).generateSQLTokens(any());
+        Collection<SQLToken> actualSQLTokens = sqlTokenGenerators.generateSQLTokens("sharding_db", mockSchemaMap(), mock(SQLStatementContext.class), Collections.emptyList());
+        assertThat(actualSQLTokens.size(), is(2));
+        assertThat(actualSQLTokens, is(expectedSQLTokens));
     }
     
     @SuppressWarnings("unchecked")
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetAdapterTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetAdapterTest.java
index ceb9dc5d6da..27b9d2a55a7 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetAdapterTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetAdapterTest.java
@@ -82,9 +82,7 @@ public final class ResultSetAdapterTest {
     
     @Test
     public void assertGetStatement() throws SQLException {
-        ResultSet resultSet = mock(ResultSet.class);
-        ShardingSphereResultSet actual = mockShardingSphereResultSet(resultSet);
-        assertNotNull(actual.getStatement());
+        assertNotNull(mockShardingSphereResultSet(mock(ResultSet.class)).getStatement());
     }
     
     @Test
@@ -97,9 +95,7 @@ public final class ResultSetAdapterTest {
     
     @Test
     public void assertGetMetaData() throws SQLException {
-        ResultSet resultSet = mock(ResultSet.class);
-        ShardingSphereResultSet actual = mockShardingSphereResultSet(resultSet);
-        assertThat(actual.getMetaData().getColumnLabel(1), is("col"));
+        assertThat(mockShardingSphereResultSet(mock(ResultSet.class)).getMetaData().getColumnLabel(1), is("col"));
     }
     
     @Test
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/datasource/ShardingSphereDataSourceTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/datasource/ShardingSphereDataSourceTest.java
index e05aa77199f..406167509e9 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/datasource/ShardingSphereDataSourceTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/datasource/ShardingSphereDataSourceTest.java
@@ -36,7 +36,6 @@ import java.util.Map;
 import java.util.Properties;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
@@ -54,7 +53,6 @@ public final class ShardingSphereDataSourceTest {
     public void assertNewConstructorWithModeConfigurationOnly() throws SQLException {
         ShardingSphereDataSource actual = new ShardingSphereDataSource(DefaultSchema.LOGIC_NAME, null);
         assertThat(actual.getDatabaseName(), is(DefaultSchema.LOGIC_NAME));
-        assertNotNull(actual.getContextManager());
         assertTrue(actual.getContextManager().getMetaDataContexts().getMetaDataMap().containsKey(DefaultSchema.LOGIC_NAME));
         assertTrue(actual.getContextManager().getTransactionContexts().getEngines().containsKey(DefaultSchema.LOGIC_NAME));
         assertThat(actual.getContextManager().getInstanceContext().getInstance().getState().getCurrentState(), is(StateType.OK));
@@ -67,7 +65,6 @@ public final class ShardingSphereDataSourceTest {
         when(connection.getMetaData().getURL()).thenReturn("jdbc:mock://127.0.0.1/foo_ds");
         ShardingSphereDataSource actual = createShardingSphereDataSource(new MockedDataSource(connection));
         assertThat(actual.getDatabaseName(), is(DefaultSchema.LOGIC_NAME));
-        assertNotNull(actual.getContextManager());
         assertTrue(actual.getContextManager().getMetaDataContexts().getMetaDataMap().containsKey(DefaultSchema.LOGIC_NAME));
         assertTrue(actual.getContextManager().getTransactionContexts().getEngines().containsKey(DefaultSchema.LOGIC_NAME));
         assertThat(actual.getContextManager().getInstanceContext().getInstance().getState().getCurrentState(), is(StateType.OK));
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtilTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtilTest.java
index 57dc5a074aa..9364f8dc762 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtilTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtilTest.java
@@ -38,7 +38,6 @@ import java.util.Date;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -147,7 +146,6 @@ public final class ResultSetUtilTest {
     public void assertConvertURLValue() throws SQLException {
         String urlString = "http://apache.org";
         URL url = (URL) ResultSetUtil.convertValue(urlString, URL.class);
-        assertNotNull(url);
         assertThat(url, is(new URL(urlString)));
     }
     
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/checker/AuthorityCheckerTest.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/checker/AuthorityCheckerTest.java
index 983c3c9c9f7..e0f8f67dc1d 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/checker/AuthorityCheckerTest.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/checker/AuthorityCheckerTest.java
@@ -45,7 +45,6 @@ import java.util.Properties;
 import java.util.stream.Collectors;
 
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
@@ -66,7 +65,6 @@ public final class AuthorityCheckerTest {
         AuthorityRuleConfiguration ruleConfig = new AuthorityRuleConfiguration(users, new ShardingSphereAlgorithmConfiguration("ALL_PRIVILEGES_PERMITTED", new Properties()));
         AuthorityRule rule = new AuthorityRule(ruleConfig, Collections.emptyMap());
         SQLChecker<AuthorityRule> sqlChecker = SQLCheckerFactory.newInstance(Collections.singleton(rule)).get(rule);
-        assertNotNull(sqlChecker);
         assertTrue(sqlChecker.check("db0", new Grantee("root", "localhost"), rule));
     }
     
@@ -79,7 +77,6 @@ public final class AuthorityCheckerTest {
         AuthorityRuleConfiguration ruleConfig = new AuthorityRuleConfiguration(users, new ShardingSphereAlgorithmConfiguration("NATIVE", new Properties()));
         AuthorityRule rule = new AuthorityRule(ruleConfig, createMetaDataMap(users));
         SQLChecker<AuthorityRule> sqlChecker = SQLCheckerFactory.newInstance(Collections.singleton(rule)).get(rule);
-        assertNotNull(sqlChecker);
         assertTrue(sqlChecker.check("db0", new Grantee("root", "localhost"), rule));
         assertFalse(sqlChecker.check("db1", new Grantee("root", "localhost"), rule));
         assertFalse(sqlChecker.check("db0", new Grantee("other", "localhost"), rule));
@@ -94,7 +91,6 @@ public final class AuthorityCheckerTest {
         AuthorityRuleConfiguration ruleConfig = new AuthorityRuleConfiguration(users, new ShardingSphereAlgorithmConfiguration("NATIVE", new Properties()));
         AuthorityRule rule = new AuthorityRule(ruleConfig, Collections.emptyMap());
         SQLChecker<AuthorityRule> sqlChecker = SQLCheckerFactory.newInstance(Collections.singleton(rule)).get(rule);
-        assertNotNull(sqlChecker);
         assertTrue(sqlChecker.check(new Grantee("root", "localhost"), rule));
         assertFalse(sqlChecker.check(new Grantee("root", "192.168.0.1"), rule));
         assertFalse(sqlChecker.check(new Grantee("admin", "localhost"), rule));
@@ -109,7 +105,6 @@ public final class AuthorityCheckerTest {
         AuthorityRuleConfiguration ruleConfig = new AuthorityRuleConfiguration(users, new ShardingSphereAlgorithmConfiguration("NATIVE", new Properties()));
         AuthorityRule rule = new AuthorityRule(ruleConfig, Collections.emptyMap());
         SQLChecker<AuthorityRule> sqlChecker = SQLCheckerFactory.newInstance(Collections.singleton(rule)).get(rule);
-        assertNotNull(sqlChecker);
         SelectStatement selectStatement = mock(SelectStatement.class);
         CreateTableStatement createTableStatement = mock(CreateTableStatement.class);
         InsertStatement insertStatement = mock(InsertStatement.class);
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationYamlSwapperTest.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationYamlSwapperTest.java
index 980364947f2..10c22fe2bd3 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationYamlSwapperTest.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationYamlSwapperTest.java
@@ -59,7 +59,6 @@ public final class AuthorityRuleConfigurationYamlSwapperTest {
         authorityRuleConfig.setUsers(Collections.singletonList("root@localhost:pass"));
         AuthorityRuleConfiguration actual = swapper.swapToObject(authorityRuleConfig);
         assertThat(actual.getUsers().size(), is(1));
-        assertNotNull(actual.getProvider());
         assertThat(actual.getProvider().getType(), is("ALL_PRIVILEGES_PERMITTED"));
     }
 }
diff --git a/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/test/java/org/apache/shardingsphere/traffic/rule/builder/TrafficRuleBuilderTest.java b/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/test/java/org/apache/shardingsphere/traffic/rule/builder/TrafficRuleBuilderTest.java
deleted file mode 100644
index 466d5ca2a8f..00000000000
--- a/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/test/java/org/apache/shardingsphere/traffic/rule/builder/TrafficRuleBuilderTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.traffic.rule.builder;
-
-import org.apache.shardingsphere.traffic.api.config.TrafficRuleConfiguration;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class TrafficRuleBuilderTest {
-    
-    private final TrafficRuleBuilder builder = new TrafficRuleBuilder();
-    
-    @Test
-    public void getOrderTest() {
-        assertThat(builder.getOrder(), is(800));
-    }
-    
-    @Test
-    public void getTypeClassTest() {
-        assertThat(TrafficRuleConfiguration.class, equalTo(builder.getTypeClass()));
-    }
-}
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/context/TransactionContextsTest.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/context/TransactionContextsTest.java
index 28b07de119b..b28c74a7cc6 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/context/TransactionContextsTest.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/test/java/org/apache/shardingsphere/transaction/context/TransactionContextsTest.java
@@ -48,8 +48,7 @@ public final class TransactionContextsTest {
         Map<String, ShardingSphereTransactionManagerEngine> engines = transactionContexts.getEngines();
         assertThat(engines.size(), is(1));
         assertThat(engines, is(actualEngines));
-        ShardingSphereTransactionManagerEngine defaultEngine = transactionContexts.getEngines().get(DefaultSchema.LOGIC_NAME);
-        assertNotNull(defaultEngine);
+        assertNotNull(transactionContexts.getEngines().get(DefaultSchema.LOGIC_NAME));
     }
     
     @Test
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
index 14be112593a..29873f1959f 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
@@ -264,7 +264,6 @@ public final class ContextManagerTest {
         contextManager.reloadMetaData("foo_db");
         verify(schemaMetaDataPersistService, times(1)).persistTables(eq("foo_db"), eq("foo_db"), any(ShardingSphereSchema.class));
         contextManager.reloadMetaData("foo_db", "foo_table");
-        assertNotNull(contextManager.getMetaDataContexts().getMetaData("foo_db"));
         contextManager.reloadMetaData("foo_db", "foo_table", "foo_ds");
         assertNotNull(contextManager.getMetaDataContexts().getMetaData("foo_db").getSchemaByName("foo_db"));
         assertTrue(contextManager.getMetaDataContexts().getMetaData("foo_db").getResource().getDataSources().containsKey("foo_ds"));
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinatorTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinatorTest.java
index 3f7fda6cc0d..703d4cdae6e 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinatorTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinatorTest.java
@@ -162,7 +162,6 @@ public final class ClusterContextManagerCoordinatorTest {
         when(metaDataPersistService.getDataSourceService().load("db_add")).thenReturn(getDataSourcePropertiesMap());
         when(metaDataPersistService.getDatabaseRulePersistService().load("db_add")).thenReturn(Collections.emptyList());
         coordinator.renew(new DatabaseAddedEvent("db_add"));
-        assertNotNull(contextManager.getMetaDataContexts().getMetaData("db_add"));
         assertNotNull(contextManager.getMetaDataContexts().getMetaData("db_add").getResource().getDataSources());
     }
     
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriberTestNoMock.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscrib [...]
index 0150f219527..4f8d93c2f98 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriberTestNoMock.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriberTestNoMock.java
@@ -44,7 +44,6 @@ import java.util.Collections;
 import java.util.LinkedList;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 
@@ -91,9 +90,7 @@ public final class ProcessRegistrySubscriberTestNoMock {
         subscriber.reportExecuteProcessSummary(new ExecuteProcessSummaryReportEvent(executeProcessContext));
         String executionID = executeProcessContext.getExecutionID();
         YamlExecuteProcessContext yamlExecuteProcessContext = ShowProcessListManager.getInstance().getProcessContext(executionID);
-        assertNotNull(yamlExecuteProcessContext);
         assertThat(yamlExecuteProcessContext.getExecutionID(), is(executionID));
-        assertNotNull(yamlExecuteProcessContext.getStartTimeMillis());
         assertThat(yamlExecuteProcessContext.getStartTimeMillis(), is(executeProcessContext.getStartTimeMillis()));
         assertThat(yamlExecuteProcessContext.getDatabaseName(), is("sharding_db"));
         assertThat(yamlExecuteProcessContext.getUsername(), is("sharding"));
@@ -109,7 +106,6 @@ public final class ProcessRegistrySubscriberTestNoMock {
         ExecuteProcessUnitReportEvent event = new ExecuteProcessUnitReportEvent(executionID, new ExecuteProcessUnit(createExecuteUnit(), processConstants));
         subscriber.reportExecuteProcessUnit(event);
         YamlExecuteProcessContext yamlExecuteProcessContext = ShowProcessListManager.getInstance().getProcessContext(executionID);
-        assertNotNull(yamlExecuteProcessContext);
         assertThat(yamlExecuteProcessContext.getExecutionID(), is(executionID));
         YamlExecuteProcessUnit yamlExecuteProcessUnit = yamlExecuteProcessContext.getUnitStatuses().iterator().next();
         assertThat(yamlExecuteProcessUnit.getStatus(), is(processConstants));
@@ -122,7 +118,6 @@ public final class ProcessRegistrySubscriberTestNoMock {
         if (ExecuteProcessConstants.EXECUTE_STATUS_DONE == processConstants) {
             assertNull(yamlExecuteProcessContext);
         } else {
-            assertNotNull(yamlExecuteProcessContext);
             assertThat(yamlExecuteProcessContext.getExecutionID(), is(executionID));
             YamlExecuteProcessUnit yamlExecuteProcessUnit = yamlExecuteProcessContext.getUnitStatuses().iterator().next();
             assertThat(yamlExecuteProcessUnit.getStatus(), is(processConstants));
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepositoryTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository- [...]
index bcecd242cd0..e83d01a31a8 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepositoryTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepositoryTest.java
@@ -62,7 +62,6 @@ import java.util.concurrent.TimeUnit;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
@@ -217,7 +216,6 @@ public final class CuratorZookeeperRepositoryTest {
         SettableFuture<DataChangedEvent> settableFuture = SettableFuture.create();
         REPOSITORY.watch("/test/children_updated/1", settableFuture::set);
         DataChangedEvent dataChangedEvent = settableFuture.get();
-        assertNotNull(dataChangedEvent);
         assertThat(dataChangedEvent.getType(), is(Type.UPDATED));
         assertThat(dataChangedEvent.getKey(), is("/test/children_updated/1"));
         assertThat(dataChangedEvent.getValue(), is("value2"));
@@ -232,7 +230,6 @@ public final class CuratorZookeeperRepositoryTest {
         SettableFuture<DataChangedEvent> settableFuture = SettableFuture.create();
         REPOSITORY.watch("/test/children_deleted/5", settableFuture::set);
         DataChangedEvent dataChangedEvent = settableFuture.get();
-        assertNotNull(dataChangedEvent);
         assertThat(dataChangedEvent.getType(), is(Type.DELETED));
         assertThat(dataChangedEvent.getKey(), is("/test/children_deleted/5"));
         assertThat(dataChangedEvent.getValue(), is("value5"));
@@ -247,7 +244,6 @@ public final class CuratorZookeeperRepositoryTest {
         SettableFuture<DataChangedEvent> settableFuture = SettableFuture.create();
         REPOSITORY.watch("/test/children_added/4", settableFuture::set);
         DataChangedEvent dataChangedEvent = settableFuture.get();
-        assertNotNull(dataChangedEvent);
         assertThat(dataChangedEvent.getType(), is(Type.ADDED));
         assertThat(dataChangedEvent.getKey(), is("/test/children_added/4"));
         assertThat(dataChangedEvent.getValue(), is("value4"));
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/database/DropDatabaseBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/database/DropDatabaseBackendHandlerTest.java
index bdc36ae890d..bb9ef49f25e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/database/DropDatabaseBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/database/DropDatabaseBackendHandlerTest.java
@@ -35,8 +35,8 @@ import org.mockito.junit.MockitoJUnitRunner;
 import java.util.Arrays;
 import java.util.Collections;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
@@ -87,8 +87,7 @@ public final class DropDatabaseBackendHandlerTest {
         when(sqlStatement.getDatabaseName()).thenReturn("test_db");
         ResponseHeader responseHeader = handler.execute();
         verify(connectionSession, times(0)).setCurrentDatabase(null);
-        assertNotNull(responseHeader);
-        assertTrue(responseHeader instanceof UpdateResponseHeader);
+        assertThat(responseHeader, instanceOf(UpdateResponseHeader.class));
     }
     
     @Test
@@ -97,8 +96,7 @@ public final class DropDatabaseBackendHandlerTest {
         when(sqlStatement.getDatabaseName()).thenReturn("test_db");
         ResponseHeader responseHeader = handler.execute();
         verify(connectionSession).setCurrentDatabase(null);
-        assertNotNull(responseHeader);
-        assertTrue(responseHeader instanceof UpdateResponseHeader);
+        assertThat(responseHeader, instanceOf(UpdateResponseHeader.class));
     }
     
     @Test
@@ -107,7 +105,6 @@ public final class DropDatabaseBackendHandlerTest {
         when(sqlStatement.getDatabaseName()).thenReturn("other_db");
         ResponseHeader responseHeader = handler.execute();
         verify(connectionSession, times(0)).setCurrentDatabase(null);
-        assertNotNull(responseHeader);
-        assertTrue(responseHeader instanceof UpdateResponseHeader);
+        assertThat(responseHeader, instanceOf(UpdateResponseHeader.class));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableExecutorTest.java
index ce9b5de9a89..6fce75d2725 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableExecutorTest.java
@@ -35,7 +35,6 @@ import org.mockito.junit.MockitoJUnitRunner;
 import java.sql.SQLException;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
@@ -72,7 +71,6 @@ public final class SetVariableExecutorTest {
         SetVariableStatement statement = new SetVariableStatement("proxy_frontend_flush_threshold", "1024");
         new SetVariableHandler().init(getParameter(statement, connectionSession)).execute();
         Object actualValue = contextManager.getMetaDataContexts().getProps().getProps().get("proxy-frontend-flush-threshold");
-        assertNotNull(actualValue);
         assertThat(actualValue.toString(), is("1024"));
     }
     
diff --git a/shardingsphere-spi/src/test/java/org/apache/shardingsphere/spi/type/typed/TypedSPIRegistryTest.java b/shardingsphere-spi/src/test/java/org/apache/shardingsphere/spi/type/typed/TypedSPIRegistryTest.java
index c8d4927f8fa..bb80525a2b2 100644
--- a/shardingsphere-spi/src/test/java/org/apache/shardingsphere/spi/type/typed/TypedSPIRegistryTest.java
+++ b/shardingsphere-spi/src/test/java/org/apache/shardingsphere/spi/type/typed/TypedSPIRegistryTest.java
@@ -59,9 +59,7 @@ public final class TypedSPIRegistryTest {
     
     @Test
     public void assertGetStatefulRegisteredService() {
-        StatefulTypedSPIFixture actual = TypedSPIRegistry.getRegisteredService(StatefulTypedSPIFixture.class, "Stateful_Fixture", createProperties());
-        assertNotNull(actual);
-        assertProperties(actual);
+        assertProperties(TypedSPIRegistry.getRegisteredService(StatefulTypedSPIFixture.class, "Stateful_Fixture", createProperties()));
     }
     
     private Properties createProperties() {
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/extractor/TableExtractorTest.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/extractor/TableExtractorTest.java
index b9a95672f30..21c7679a938 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/extractor/TableExtractorTest.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/extractor/TableExtractorTest.java
@@ -28,7 +28,6 @@ import java.util.Iterator;
 import java.util.Optional;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -51,7 +50,6 @@ public final class TableExtractorTest {
         lockSegment.getTables().add(new SimpleTableSegment(new TableNameSegment(122, 128, new IdentifierValue("t_order"))));
         lockSegment.getTables().add(new SimpleTableSegment(new TableNameSegment(143, 154, new IdentifierValue("t_order_item"))));
         tableExtractor.extractTablesFromSelect(selectStatement);
-        assertNotNull(tableExtractor.getRewriteTables());
         assertThat(tableExtractor.getRewriteTables().size(), is(2));
         Iterator<SimpleTableSegment> tableSegmentIterator = tableExtractor.getRewriteTables().iterator();
         assertTableSegment(tableSegmentIterator.next(), 122, 128, "t_order");
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterSQLParserRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterSQLParserRuleStatementAssert.java
index 36c7cb5381a..c95e39cc5a9 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterSQLParserRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterSQLParserRuleStatementAssert.java
@@ -47,7 +47,6 @@ public final class AlterSQLParserRuleStatementAssert {
             assertNotNull(assertContext.getText("Actual statement should exist."), actual);
         }
         assertNotNull(actual);
-        assertNotNull(expected.getSqlParserRule());
         assertCacheOption(assertContext, actual.getParseTreeCache(), expected.getSqlParserRule().getParseTreeCache());
         assertCacheOption(assertContext, actual.getSqlStatementCache(), expected.getSqlParserRule().getSqlStatementCache());
     }
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterTrafficRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterTrafficRuleStatementAssert.java
index 8bb048c2600..5f66c43a72e 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterTrafficRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/AlterTrafficRuleStatementAssert.java
@@ -51,7 +51,6 @@ public final class AlterTrafficRuleStatementAssert {
             assertNull(assertContext.getText("Actual statement should not exist."), actual);
         } else {
             assertNotNull(assertContext.getText("Actual statement should exist."), actual);
-            assertNotNull(actual);
             assertTrafficRuleSegments(assertContext, actual.getSegments(), expected.getRules());
         }
     }
@@ -60,7 +59,6 @@ public final class AlterTrafficRuleStatementAssert {
         Map<String, TrafficRuleSegment> actualMap = actual.stream().collect(Collectors.toMap(TrafficRuleSegment::getName, each -> each));
         expected.forEach(each -> {
             TrafficRuleSegment actualRule = actualMap.get(each.getName());
-            assertNotNull(actualRule);
             assertThat(actualRule.getName(), is(each.getName()));
             assertThat(actualRule.getLabels(), is(each.getLabels()));
             AlgorithmAssert.assertIs(assertContext, actualRule.getAlgorithm(), each.getTrafficAlgorithm());
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/CreateTrafficRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/CreateTrafficRuleStatementAssert.java
index 0a4a271f0c5..571a9d264a7 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/CreateTrafficRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/updatable/CreateTrafficRuleStatementAssert.java
@@ -51,7 +51,6 @@ public final class CreateTrafficRuleStatementAssert {
             assertNull(assertContext.getText("Actual statement should not exist."), actual);
         } else {
             assertNotNull(assertContext.getText("Actual statement should exist."), actual);
-            assertNotNull(actual);
             assertTrafficRuleSegments(assertContext, actual.getSegments(), expected.getRules());
         }
     }
@@ -60,7 +59,6 @@ public final class CreateTrafficRuleStatementAssert {
         Map<String, TrafficRuleSegment> actualMap = actual.stream().collect(Collectors.toMap(TrafficRuleSegment::getName, each -> each));
         expected.forEach(each -> {
             TrafficRuleSegment actualRule = actualMap.get(each.getName());
-            assertNotNull(actualRule);
             assertThat(actualRule.getName(), is(each.getName()));
             assertThat(actualRule.getLabels(), is(each.getLabels()));
             AlgorithmAssert.assertIs(assertContext, actualRule.getAlgorithm(), each.getTrafficAlgorithm());
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryHeartbeatStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryHeartbeatStatementAssert.java
index c880cb69222..2f68753be6f 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryHeartbeatStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryHeartbeatStatementAssert.java
@@ -54,7 +54,6 @@ public final class AlterDatabaseDiscoveryHeartbeatStatementAssert {
             Map<String, DatabaseDiscoveryHeartbeatSegment> actualMap = actual.getHeartbeats().stream().collect(Collectors.toMap(DatabaseDiscoveryHeartbeatSegment::getHeartbeatName, each -> each));
             expected.getHeartbeats().forEach(each -> {
                 DatabaseDiscoveryHeartbeatSegment actualSegment = actualMap.get(each.getName());
-                assertNotNull(actualSegment);
                 assertThat(actualSegment.getHeartbeatName(), is(each.getName()));
                 PropertiesAssert.assertIs(assertContext, actualSegment.getProperties(), each.getProperties());
             });
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryTypeStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryTypeStatementAssert.java
index cf3ae25b3a4..ae166b260c5 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryTypeStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDatabaseDiscoveryTypeStatementAssert.java
@@ -55,7 +55,6 @@ public final class AlterDatabaseDiscoveryTypeStatementAssert {
                     .stream().collect(Collectors.toMap(DatabaseDiscoveryProviderAlgorithmSegment::getDiscoveryProviderName, each -> each));
             expected.getTypes().forEach(each -> {
                 DatabaseDiscoveryProviderAlgorithmSegment actualSegment = actualMap.get(each.getDiscoveryTypeName());
-                assertNotNull(actualSegment);
                 assertThat(actualSegment.getDiscoveryProviderName(), is(each.getDiscoveryTypeName()));
                 AlgorithmAssert.assertIs(assertContext, actualSegment.getAlgorithm(), each.getAlgorithmSegment());
             });
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java
index e1ff5dd5352..ff4adff675a 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java
@@ -56,7 +56,6 @@ public final class AlterShadowAlgorithmStatementAssert {
     }
     
     private static void assertIsAlgorithmsSegment(final SQLCaseAssertContext assertContext, final ShadowAlgorithmSegment actual, final ExpectedShadowAlgorithm expected) {
-        assertNotNull(actual);
         AlgorithmAssert.assertIs(assertContext, actual.getAlgorithmSegment(), expected.getAlgorithmSegment());
     }
 }
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryHeartbeatStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryHeartbeatStatementAssert.java
index af256b1e20b..5cdf46c4d89 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryHeartbeatStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryHeartbeatStatementAssert.java
@@ -54,7 +54,6 @@ public final class CreateDatabaseDiscoveryHeartbeatStatementAssert {
             Map<String, DatabaseDiscoveryHeartbeatSegment> actualMap = actual.getHeartbeats().stream().collect(Collectors.toMap(DatabaseDiscoveryHeartbeatSegment::getHeartbeatName, each -> each));
             expected.getHeartbeats().forEach(each -> {
                 DatabaseDiscoveryHeartbeatSegment actualSegment = actualMap.get(each.getName());
-                assertNotNull(actualSegment);
                 assertThat(actualSegment.getHeartbeatName(), is(each.getName()));
                 PropertiesAssert.assertIs(assertContext, actualSegment.getProperties(), each.getProperties());
             });
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryRuleStatementAssert.java
index b45ae713373..0b35cfdba7b 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryRuleStatementAssert.java
@@ -26,7 +26,6 @@ import org.apache.shardingsphere.dbdiscovery.distsql.parser.statement.CreateData
 import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
 import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.distsql.AlgorithmAssert;
 import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.distsql.PropertiesAssert;
-import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.ExpectedProperties;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.ExpectedDatabaseDiscoveryConstructionRule;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.ExpectedDatabaseDiscoveryDefinitionRule;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
@@ -36,7 +35,6 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.stream.Collectors;
 
 import static org.hamcrest.CoreMatchers.is;
@@ -83,7 +81,6 @@ public final class CreateDatabaseDiscoveryRuleStatementAssert {
                 .collect(Collectors.toMap(AbstractDatabaseDiscoverySegment::getName, each -> each));
         expected.forEach(each -> {
             DatabaseDiscoveryDefinitionSegment actualSegment = actualMap.get(each.getName());
-            assertNotNull(actualSegment);
             assertThat(actualSegment.getName(), is(each.getName()));
             assertThat(actualSegment.getDataSources(), is(each.getDataSources()));
             PropertiesAssert.assertIs(assertContext, actualSegment.getDiscoveryHeartbeat(), each.getDiscoveryHeartbeat());
@@ -99,20 +96,10 @@ public final class CreateDatabaseDiscoveryRuleStatementAssert {
                 .collect(Collectors.toMap(AbstractDatabaseDiscoverySegment::getName, each -> each));
         expected.forEach(each -> {
             DatabaseDiscoveryConstructionSegment actualSegment = actualMap.get(each.getName());
-            assertNotNull(actualSegment);
             assertThat(actualSegment.getName(), is(each.getName()));
             assertThat(actualSegment.getDataSources(), is(each.getDataSources()));
             assertThat(actualSegment.getDiscoveryHeartbeatName(), is(each.getDiscoveryHeartbeat()));
             assertThat(actualSegment.getDiscoveryTypeName(), is(each.getDiscoveryType()));
         });
     }
-    
-    private static void assertProps(final SQLCaseAssertContext assertContext, final Properties actual, final ExpectedProperties expected) {
-        if (null == expected) {
-            assertNull(assertContext.getText("Actual properties should not exist"), actual);
-        } else {
-            assertNotNull(assertContext.getText("Actual properties should exist"), actual);
-            PropertiesAssert.assertIs(assertContext, actual, expected);
-        }
-    }
 }
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryTypeStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryTypeStatementAssert.java
index 6a1cafb378b..b1d37bd22f8 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryTypeStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDatabaseDiscoveryTypeStatementAssert.java
@@ -55,7 +55,6 @@ public final class CreateDatabaseDiscoveryTypeStatementAssert {
                     .stream().collect(Collectors.toMap(DatabaseDiscoveryProviderAlgorithmSegment::getDiscoveryProviderName, each -> each));
             expected.getTypes().forEach(each -> {
                 DatabaseDiscoveryProviderAlgorithmSegment actualSegment = actualMap.get(each.getDiscoveryTypeName());
-                assertNotNull(actualSegment);
                 assertThat(actualSegment.getDiscoveryProviderName(), is(each.getDiscoveryTypeName()));
                 AlgorithmAssert.assertIs(assertContext, actualSegment.getAlgorithm(), each.getAlgorithmSegment());
             });
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/CallStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/CallStatementAssert.java
index 2326a7a1908..e4e0f5e825d 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/CallStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/CallStatementAssert.java
@@ -30,7 +30,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.e
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.call.ExpectedCallParameter;
 import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dml.CallStatementTestCase;
 
-import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 
 /**
@@ -55,7 +55,7 @@ public final class CallStatementAssert {
         if (actual instanceof MySQLCallStatement) {
             MySQLCallStatement actualStatement = (MySQLCallStatement) actual;
             if (actualStatement.getParameters() != null && expected.getProcedureParameters() != null) {
-                assertThat(assertContext.getText("Procedure parameters assertion error: "), actualStatement.getParameters().size(), equalTo(expected.getProcedureParameters().getParameters().size()));
+                assertThat(assertContext.getText("Procedure parameters assertion error: "), actualStatement.getParameters().size(), is(expected.getProcedureParameters().getParameters().size()));
                 int count = 0;
                 for (ExpressionSegment each : actualStatement.getParameters()) {
                     assertParameter(assertContext, each, expected.getProcedureParameters().getParameters().get(count));
@@ -77,7 +77,7 @@ public final class CallStatementAssert {
     
     private static void assertProcedureName(final SQLCaseAssertContext assertContext, final CallStatement actual, final CallStatementTestCase expected) {
         if (actual instanceof MySQLCallStatement) {
-            assertThat(assertContext.getText("Procedure name assertion error: "), ((MySQLCallStatement) actual).getProcedureName(), equalTo(expected.getProcedureName().getName()));
+            assertThat(assertContext.getText("Procedure name assertion error: "), ((MySQLCallStatement) actual).getProcedureName(), is(expected.getProcedureName().getName()));
         }
     }
 }
diff --git a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/prepare/InventoryTaskSplitterTest.java b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/prepare/InventoryTaskSplitterTest.java
index 5d60ea5c0f0..a5823bfe5fe 100644
--- a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/prepare/InventoryTaskSplitterTest.java
+++ b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/prepare/InventoryTaskSplitterTest.java
@@ -36,7 +36,6 @@ import java.sql.Statement;
 import java.util.List;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 public final class InventoryTaskSplitterTest {
@@ -71,7 +70,6 @@ public final class InventoryTaskSplitterTest {
         taskConfig.getJobConfig().setShardingSize(10);
         initEmptyTablePrimaryEnvironment(taskConfig.getDumperConfig());
         List<InventoryTask> actual = inventoryTaskSplitter.splitInventoryData(jobContext);
-        assertNotNull(actual);
         assertThat(actual.size(), is(1));
         assertThat(((PrimaryKeyPosition) actual.get(0).getProgress().getPosition()).getBeginValue(), is(0L));
         assertThat(((PrimaryKeyPosition) actual.get(0).getProgress().getPosition()).getEndValue(), is(0L));
@@ -82,7 +80,6 @@ public final class InventoryTaskSplitterTest {
         taskConfig.getJobConfig().setShardingSize(10);
         initIntPrimaryEnvironment(taskConfig.getDumperConfig());
         List<InventoryTask> actual = inventoryTaskSplitter.splitInventoryData(jobContext);
-        assertNotNull(actual);
         assertThat(actual.size(), is(10));
         assertThat(((PrimaryKeyPosition) actual.get(9).getProgress().getPosition()).getBeginValue(), is(91L));
         assertThat(((PrimaryKeyPosition) actual.get(9).getProgress().getPosition()).getEndValue(), is(100L));