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 2020/07/14 04:58:18 UTC

[shardingsphere-elasticjob-lite] branch master updated: Remove unitils dependency (#1054)

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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-lite.git


The following commit(s) were added to refs/heads/master by this push:
     new 98182a6  Remove unitils dependency (#1054)
98182a6 is described below

commit 98182a65beae6cfaee786d8acdaf468ab81aa0b6
Author: Liang Zhang <te...@163.com>
AuthorDate: Tue Jul 14 12:58:10 2020 +0800

    Remove unitils dependency (#1054)
    
    * Decouple unitils
    
    * Remove unitils dependency
---
 elasticjob-cloud/elasticjob-cloud-common/pom.xml   |  4 --
 elasticjob-cloud/elasticjob-cloud-executor/pom.xml |  4 --
 .../cloud/executor/TaskExecutorTest.java           | 14 +++--
 .../elasticjob-cloud-scheduler/pom.xml             |  4 --
 .../elasticjob/cloud/ReflectionUtils.java          | 63 ++++++++++++++++++++++
 .../job/CloudJobConfigurationListenerTest.java     |  4 +-
 .../scheduler/env/BootstrapEnvironmentTest.java    | 10 ++--
 .../cloud/scheduler/mesos/FacadeServiceTest.java   | 12 ++---
 .../cloud/scheduler/mesos/LaunchingTasksTest.java  |  6 +--
 .../cloud/scheduler/mesos/SchedulerEngineTest.java |  6 +--
 .../scheduler/producer/ProducerManagerTest.java    | 10 ++--
 .../producer/TransientProducerSchedulerTest.java   |  6 +--
 .../scheduler/restful/CloudJobRestfulApiTest.java  | 10 ++--
 .../restful/CloudOperationRestfulApiTest.java      |  2 +-
 .../state/failover/FailoverServiceTest.java        |  8 +--
 .../scheduler/state/ready/ReadyServiceTest.java    |  8 +--
 .../scheduler/statistics/StatisticManagerTest.java | 40 +++++++-------
 .../statistics/StatisticsSchedulerTest.java        |  4 +-
 pom.xml                                            |  7 ---
 19 files changed, 137 insertions(+), 85 deletions(-)

diff --git a/elasticjob-cloud/elasticjob-cloud-common/pom.xml b/elasticjob-cloud/elasticjob-cloud-common/pom.xml
index 9241acb..0062e23 100755
--- a/elasticjob-cloud/elasticjob-cloud-common/pom.xml
+++ b/elasticjob-cloud/elasticjob-cloud-common/pom.xml
@@ -104,10 +104,6 @@
             <artifactId>junit</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.unitils</groupId>
-            <artifactId>unitils-core</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
         </dependency>
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/pom.xml b/elasticjob-cloud/elasticjob-cloud-executor/pom.xml
index c620b1d..6bf885e 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/pom.xml
+++ b/elasticjob-cloud/elasticjob-cloud-executor/pom.xml
@@ -78,10 +78,6 @@
             <artifactId>junit</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.unitils</groupId>
-            <artifactId>unitils-core</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
         </dependency>
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/TaskExecutorTest.java b/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/TaskExecutorTest.java
index 52f9945..dff0548 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/TaskExecutorTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/TaskExecutorTest.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.elasticjob.cloud.executor;
 
 import com.google.protobuf.ByteString;
+import lombok.SneakyThrows;
 import org.apache.commons.lang3.SerializationUtils;
 import org.apache.mesos.ExecutorDriver;
 import org.apache.mesos.Protos;
@@ -32,8 +33,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
+import java.lang.reflect.Field;
 import java.util.HashMap;
 import java.util.concurrent.ExecutorService;
 
@@ -57,12 +58,19 @@ public final class TaskExecutorTest {
     private TaskExecutor taskExecutor;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         taskExecutor = new TaskExecutor(new TestJob());
-        ReflectionUtils.setFieldValue(taskExecutor, "executorService", executorService);
+        setExecutorService();
         executorInfo = ExecutorInfo.getDefaultInstance();
     }
     
+    @SneakyThrows
+    private void setExecutorService() {
+        Field field = TaskExecutor.class.getDeclaredField("executorService");
+        field.setAccessible(true);
+        field.set(taskExecutor, executorService);
+    }
+    
     @Test
     public void assertKillTask() {
         TaskID taskID = Protos.TaskID.newBuilder().setValue("task_id").build();
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/pom.xml b/elasticjob-cloud/elasticjob-cloud-scheduler/pom.xml
index 5cc648c..ab4bc98 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/pom.xml
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/pom.xml
@@ -127,10 +127,6 @@
             <artifactId>junit</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.unitils</groupId>
-            <artifactId>unitils-core</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
         </dependency>
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/ReflectionUtils.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/ReflectionUtils.java
new file mode 100644
index 0000000..c2f8bcf
--- /dev/null
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/ReflectionUtils.java
@@ -0,0 +1,63 @@
+/*
+ * 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.elasticjob.cloud;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+/**
+ * Reflection utilities.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class ReflectionUtils {
+    
+    /**
+     * Set field value.
+     *
+     * @param target target object
+     * @param fieldName field name
+     * @param fieldValue field value
+     */
+    @SneakyThrows
+    public static void setFieldValue(final Object target, final String fieldName, final Object fieldValue) {
+        Field field = target.getClass().getDeclaredField(fieldName);
+        field.setAccessible(true);
+        field.set(target, fieldValue);
+    }
+    
+    /**
+     * Set static field value.
+     *
+     * @param target target object
+     * @param fieldName field name
+     * @param fieldValue field value
+     */
+    @SneakyThrows
+    public static void setStaticFieldValue(final Class target, final String fieldName, final Object fieldValue) {
+        Field field = target.getDeclaredField(fieldName);
+        field.setAccessible(true);
+        Field modifiers = field.getClass().getDeclaredField("modifiers");
+        modifiers.setAccessible(true);
+        modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
+        field.set(target, fieldValue);
+    }
+}
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListenerTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListenerTest.java
index c32f46a..23a48d9 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListenerTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListenerTest.java
@@ -19,6 +19,7 @@ package org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job;
 
 import org.apache.curator.framework.recipes.cache.ChildData;
 import org.apache.curator.framework.recipes.cache.TreeCacheEvent;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJsonConstants;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.producer.ProducerManager;
@@ -30,7 +31,6 @@ import org.mockito.ArgumentMatchers;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Collections;
 
@@ -50,7 +50,7 @@ public final class CloudJobConfigurationListenerTest {
     private CloudJobConfigurationListener cloudJobConfigurationListener;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         ReflectionUtils.setFieldValue(cloudJobConfigurationListener, "producerManager", producerManager);
         ReflectionUtils.setFieldValue(cloudJobConfigurationListener, "readyService", readyService);
     }
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/env/BootstrapEnvironmentTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/env/BootstrapEnvironmentTest.java
index 93a4984..5a5560d 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/env/BootstrapEnvironmentTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/env/BootstrapEnvironmentTest.java
@@ -18,10 +18,10 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.env;
 
 import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperConfiguration;
 import org.apache.shardingsphere.elasticjob.tracing.api.TracingConfiguration;
 import org.junit.Test;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Map;
 import java.util.Optional;
@@ -45,7 +45,7 @@ public final class BootstrapEnvironmentTest {
     }
     
     @Test
-    public void assertGetZookeeperConfiguration() throws NoSuchFieldException {
+    public void assertGetZookeeperConfiguration() {
         Properties properties = new Properties();
         properties.setProperty(BootstrapEnvironment.EnvironmentArgument.ZOOKEEPER_DIGEST.getKey(), "test");
         ReflectionUtils.setFieldValue(bootstrapEnvironment, "properties", properties);
@@ -68,7 +68,7 @@ public final class BootstrapEnvironmentTest {
     }
     
     @Test
-    public void assertGetEventTraceRdbConfiguration() throws NoSuchFieldException {
+    public void assertGetEventTraceRdbConfiguration() {
         Properties properties = new Properties();
         properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_DRIVER.getKey(), "org.h2.Driver");
         properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_URL.getKey(), "jdbc:h2:mem:job_event_trace");
@@ -85,7 +85,7 @@ public final class BootstrapEnvironmentTest {
     }
     
     @Test
-    public void assertGetEventTraceRdbConfigurationMap() throws NoSuchFieldException {
+    public void assertGetEventTraceRdbConfigurationMap() {
         Properties properties = new Properties();
         properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_DRIVER.getKey(), "org.h2.Driver");
         properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_URL.getKey(), "jdbc:h2:mem:job_event_trace");
@@ -100,7 +100,7 @@ public final class BootstrapEnvironmentTest {
     }
     
     @Test
-    public void assertReconcileConfiguration() throws NoSuchFieldException {
+    public void assertReconcileConfiguration() {
         FrameworkConfiguration configuration = bootstrapEnvironment.getFrameworkConfiguration();
         assertThat(configuration.getReconcileIntervalMinutes(), is(-1));
         assertFalse(configuration.isEnabledReconcile());
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/FacadeServiceTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/FacadeServiceTest.java
index dc6b842..e98dd70 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/FacadeServiceTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/FacadeServiceTest.java
@@ -18,13 +18,12 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.mesos;
 
 import com.google.common.collect.Sets;
-import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
-import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
+import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobConfiguration;
+import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.app.CloudAppConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.app.CloudAppConfigurationService;
-import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
-import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.context.JobContext;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudAppConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
@@ -34,13 +33,14 @@ import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.disable.job.Di
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.failover.FailoverService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.ready.ReadyService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.running.RunningService;
+import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
+import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
 import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -88,7 +88,7 @@ public final class FacadeServiceTest {
     private FacadeService facadeService;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         facadeService = new FacadeService(regCenter);
         ReflectionUtils.setFieldValue(facadeService, "jobConfigService", jobConfigService);
         ReflectionUtils.setFieldValue(facadeService, "appConfigService", appConfigService);
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/LaunchingTasksTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/LaunchingTasksTest.java
index 72c0836..6a19ac9 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/LaunchingTasksTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/LaunchingTasksTest.java
@@ -18,20 +18,20 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.mesos;
 
 import com.netflix.fenzo.TaskRequest;
-import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.context.JobContext;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.failover.FailoverService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.ready.ReadyService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.running.RunningService;
+import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
 import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Arrays;
 import java.util.List;
@@ -63,7 +63,7 @@ public final class LaunchingTasksTest {
     private LaunchingTasks launchingTasks;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         facadeService = new FacadeService(regCenter);
         ReflectionUtils.setFieldValue(facadeService, "jobConfigService", jobConfigService);
         ReflectionUtils.setFieldValue(facadeService, "readyService", readyService);
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/SchedulerEngineTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/SchedulerEngineTest.java
index 106f175..2855979 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/SchedulerEngineTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/mesos/SchedulerEngineTest.java
@@ -21,13 +21,14 @@ import com.netflix.fenzo.TaskScheduler;
 import com.netflix.fenzo.functions.Action2;
 import org.apache.mesos.Protos;
 import org.apache.mesos.SchedulerDriver;
-import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.TaskNode;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.ha.FrameworkIDService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.mesos.fixture.OfferBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.running.RunningService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.statistics.StatisticManager;
+import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
 import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
 import org.apache.shardingsphere.elasticjob.tracing.JobEventBus;
 import org.junit.Before;
@@ -36,7 +37,6 @@ import org.junit.runner.RunWith;
 import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Arrays;
 import java.util.List;
@@ -67,7 +67,7 @@ public final class SchedulerEngineTest {
     private SchedulerEngine schedulerEngine;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         schedulerEngine = new SchedulerEngine(taskScheduler, facadeService, new JobEventBus(), frameworkIDService, statisticManager);
         ReflectionUtils.setFieldValue(schedulerEngine, "facadeService", facadeService);
         when(facadeService.load("test_job")).thenReturn(Optional.of(CloudJobConfigurationBuilder.createCloudJobConfiguration("test_job")));
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/ProducerManagerTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/ProducerManagerTest.java
index 6d7449f..d992c50 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/ProducerManagerTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/ProducerManagerTest.java
@@ -20,18 +20,19 @@ package org.apache.shardingsphere.elasticjob.cloud.scheduler.producer;
 import com.google.common.collect.Lists;
 import org.apache.mesos.Protos;
 import org.apache.mesos.SchedulerDriver;
-import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
+import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobConfiguration;
+import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
 import org.apache.shardingsphere.elasticjob.cloud.exception.AppConfigurationException;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.app.CloudAppConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.app.CloudAppConfigurationService;
-import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
-import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudAppConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.disable.job.DisableJobService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.ready.ReadyService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.running.RunningService;
+import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
 import org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException;
 import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
 import org.junit.Before;
@@ -39,7 +40,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Arrays;
 import java.util.List;
@@ -85,7 +85,7 @@ public final class ProducerManagerTest {
     private final CloudJobConfiguration daemonJobConfig = CloudJobConfigurationBuilder.createCloudJobConfiguration("daemon_test_job", CloudJobExecutionType.DAEMON);
 
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         producerManager = new ProducerManager(schedulerDriver, regCenter);
         ReflectionUtils.setFieldValue(producerManager, "appConfigService", appConfigService);
         ReflectionUtils.setFieldValue(producerManager, "configService", configService);
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/TransientProducerSchedulerTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/TransientProducerSchedulerTest.java
index 205898f..0779718 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/TransientProducerSchedulerTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/producer/TransientProducerSchedulerTest.java
@@ -17,8 +17,9 @@
 
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.producer;
 
-import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobConfiguration;
+import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.ready.ReadyService;
 import org.junit.Before;
 import org.junit.Test;
@@ -33,7 +34,6 @@ import org.quartz.SchedulerException;
 import org.quartz.Trigger;
 import org.quartz.TriggerBuilder;
 import org.quartz.TriggerKey;
-import org.unitils.util.ReflectionUtils;
 
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -58,7 +58,7 @@ public final class TransientProducerSchedulerTest {
                         .withMisfireHandlingInstructionDoNothing()).build();
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         transientProducerScheduler = new TransientProducerScheduler(readyService);
         ReflectionUtils.setFieldValue(transientProducerScheduler, "scheduler", scheduler);
     }
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudJobRestfulApiTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudJobRestfulApiTest.java
index 8522f08..6cb5aed 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudJobRestfulApiTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudJobRestfulApiTest.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.restful;
 
 import com.google.common.collect.Lists;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudAppJsonConstants;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJsonConstants;
@@ -36,7 +37,6 @@ import org.apache.shardingsphere.elasticjob.tracing.event.JobStatusTraceEvent;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
@@ -201,14 +201,14 @@ public final class CloudJobRestfulApiTest extends AbstractCloudRestfulApiTest {
     
     @Test
     public void assertFindJobExecutionEventsWhenNotConfigRDB() throws Exception {
-        ReflectionUtils.setFieldValue(CloudJobRestfulApi.class, CloudJobRestfulApi.class.getDeclaredField("jobEventRdbSearch"), null);
+        ReflectionUtils.setStaticFieldValue(CloudJobRestfulApi.class, "jobEventRdbSearch", null);
         assertThat(RestfulTestsUtil.sentGetRequest("http://127.0.0.1:19000/api/job/events/executions"), is(GsonFactory.getGson().toJson(new JobEventRdbSearch.Result<>(0,
                 Collections.<JobExecutionEvent>emptyList()))));
     }
     
     @Test
     public void assertFindJobExecutionEvents() throws Exception {
-        ReflectionUtils.setFieldValue(CloudJobRestfulApi.class, CloudJobRestfulApi.class.getDeclaredField("jobEventRdbSearch"), getJobEventRdbSearch());
+        ReflectionUtils.setStaticFieldValue(CloudJobRestfulApi.class, "jobEventRdbSearch", getJobEventRdbSearch());
         JobExecutionEvent jobExecutionEvent = new JobExecutionEvent("localhost", "127.0.0.1", "fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
         when(getJobEventRdbSearch().findJobExecutionEvents(any(JobEventRdbSearch.Condition.class))).thenReturn(new JobEventRdbSearch.Result<>(0,
                 Lists.newArrayList(jobExecutionEvent)));
@@ -219,14 +219,14 @@ public final class CloudJobRestfulApiTest extends AbstractCloudRestfulApiTest {
     
     @Test
     public void assertFindJobStatusTraceEventEventsWhenNotConfigRDB() throws Exception {
-        ReflectionUtils.setFieldValue(CloudJobRestfulApi.class, CloudJobRestfulApi.class.getDeclaredField("jobEventRdbSearch"), null);
+        ReflectionUtils.setStaticFieldValue(CloudJobRestfulApi.class, "jobEventRdbSearch", null);
         assertThat(RestfulTestsUtil.sentGetRequest("http://127.0.0.1:19000/api/job/events/statusTraces"), is(GsonFactory.getGson().toJson(new JobEventRdbSearch.Result<>(0,
                 Collections.<JobExecutionEvent>emptyList()))));
     }
     
     @Test
     public void assertFindJobStatusTraceEvent() throws Exception {
-        ReflectionUtils.setFieldValue(CloudJobRestfulApi.class, CloudJobRestfulApi.class.getDeclaredField("jobEventRdbSearch"), getJobEventRdbSearch());
+        ReflectionUtils.setStaticFieldValue(CloudJobRestfulApi.class, "jobEventRdbSearch", getJobEventRdbSearch());
         JobStatusTraceEvent jobStatusTraceEvent = new JobStatusTraceEvent("test-job", 
                 "fake_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.READY.toString(), "0", JobStatusTraceEvent.State.TASK_RUNNING, "message is empty.");
         when(getJobEventRdbSearch().findJobStatusTraceEvents(any(JobEventRdbSearch.Condition.class))).thenReturn(new Result<>(0,
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApiTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApiTest.java
index 48fccdb..e73d2c2 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApiTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApiTest.java
@@ -17,9 +17,9 @@
 
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.restful;
 
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.ha.HANode;
 import org.junit.Test;
-import org.unitils.util.ReflectionUtils;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/failover/FailoverServiceTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/failover/FailoverServiceTest.java
index 2dc4fa5..41f9c0b 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/failover/FailoverServiceTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/failover/FailoverServiceTest.java
@@ -18,21 +18,21 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.state.failover;
 
 import com.google.common.collect.Lists;
-import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
-import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.context.JobContext;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.env.BootstrapEnvironment;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.TaskNode;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.running.RunningService;
+import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
+import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
 import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -63,7 +63,7 @@ public final class FailoverServiceTest {
     private FailoverService failoverService;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         failoverService = new FailoverService(regCenter);
         ReflectionUtils.setFieldValue(failoverService, "configService", configService);
         ReflectionUtils.setFieldValue(failoverService, "runningService", runningService);
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/ready/ReadyServiceTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/ready/ReadyServiceTest.java
index c81aa76..caaaec2 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/ready/ReadyServiceTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/state/ready/ReadyServiceTest.java
@@ -18,13 +18,14 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.state.ready;
 
 import com.google.common.collect.Lists;
-import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
-import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
+import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.context.JobContext;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.env.BootstrapEnvironment;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.state.running.RunningService;
+import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
 import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
 import org.junit.Before;
 import org.junit.Test;
@@ -32,7 +33,6 @@ import org.junit.runner.RunWith;
 import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -62,7 +62,7 @@ public final class ReadyServiceTest {
     private ReadyService readyService;
         
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         readyService = new ReadyService(regCenter);
         ReflectionUtils.setFieldValue(readyService, "configService", configService);
         ReflectionUtils.setFieldValue(readyService, "runningService", runningService);
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticManagerTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticManagerTest.java
index c77331a..f8b3b2f 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticManagerTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticManagerTest.java
@@ -18,8 +18,9 @@
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.statistics;
 
 import com.google.common.collect.Lists;
-import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.config.CloudJobExecutionType;
+import org.apache.shardingsphere.elasticjob.cloud.scheduler.config.job.CloudJobConfigurationService;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.fixture.CloudJobConfigurationBuilder;
 import org.apache.shardingsphere.elasticjob.cloud.statistics.StatisticInterval;
 import org.apache.shardingsphere.elasticjob.cloud.statistics.rdb.StatisticRdbRepository;
@@ -34,7 +35,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.unitils.util.ReflectionUtils;
 
 import java.util.Date;
 import java.util.Optional;
@@ -71,9 +71,9 @@ public final class StatisticManagerTest {
     }
     
     @After
-    public void tearDown() throws NoSuchFieldException {
+    public void tearDown() {
         statisticManager.shutdown();
-        ReflectionUtils.setFieldValue(StatisticManager.class, StatisticManager.class.getDeclaredField("instance"), null);
+        ReflectionUtils.setStaticFieldValue(StatisticManager.class, "instance", null);
         reset(configurationService);
         reset(rdbRepository);
     }
@@ -84,19 +84,19 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertStartupWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertStartupWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         statisticManager.startup();
     }
     
     @Test
-    public void assertStartupWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertStartupWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         statisticManager.startup();
     }
     
     @Test
-    public void assertShutdown() throws NoSuchFieldException {
+    public void assertShutdown() {
         ReflectionUtils.setFieldValue(statisticManager, "scheduler", scheduler);
         statisticManager.shutdown();
         verify(scheduler).shutdown();
@@ -109,7 +109,7 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertTaskResultStatisticsWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertTaskResultStatisticsWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         assertThat(statisticManager.getTaskResultStatisticsWeekly().getSuccessCount(), is(0));
         assertThat(statisticManager.getTaskResultStatisticsWeekly().getFailedCount(), is(0));
@@ -118,7 +118,7 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertTaskResultStatisticsWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertTaskResultStatisticsWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         when(rdbRepository.getSummedTaskResultStatistics(any(Date.class), any(StatisticInterval.class)))
             .thenReturn(new TaskResultStatistics(10, 10, StatisticInterval.DAY, new Date()));
@@ -130,7 +130,7 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertJobExecutionTypeStatistics() throws NoSuchFieldException {
+    public void assertJobExecutionTypeStatistics() {
         ReflectionUtils.setFieldValue(statisticManager, "configurationService", configurationService);
         when(configurationService.loadAll()).thenReturn(Lists.newArrayList(
                 CloudJobConfigurationBuilder.createCloudJobConfiguration("test_job_1", CloudJobExecutionType.DAEMON),
@@ -141,13 +141,13 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertFindTaskRunningStatisticsWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertFindTaskRunningStatisticsWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         assertTrue(statisticManager.findTaskRunningStatisticsWeekly().isEmpty());
     }
     
     @Test
-    public void assertFindTaskRunningStatisticsWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertFindTaskRunningStatisticsWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         when(rdbRepository.findTaskRunningStatistics(any(Date.class)))
             .thenReturn(Lists.newArrayList(new TaskRunningStatistics(10, new Date())));
@@ -156,13 +156,13 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertFindJobRunningStatisticsWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertFindJobRunningStatisticsWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         assertTrue(statisticManager.findJobRunningStatisticsWeekly().isEmpty());
     }
     
     @Test
-    public void assertFindJobRunningStatisticsWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertFindJobRunningStatisticsWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         when(rdbRepository.findJobRunningStatistics(any(Date.class)))
             .thenReturn(Lists.newArrayList(new JobRunningStatistics(10, new Date())));
@@ -171,13 +171,13 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertFindJobRegisterStatisticsWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertFindJobRegisterStatisticsWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         assertTrue(statisticManager.findJobRegisterStatisticsSinceOnline().isEmpty());
     }
     
     @Test
-    public void assertFindJobRegisterStatisticsWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertFindJobRegisterStatisticsWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         when(rdbRepository.findJobRegisterStatistics(any(Date.class)))
             .thenReturn(Lists.newArrayList(new JobRegisterStatistics(10, new Date())));
@@ -186,7 +186,7 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertFindLatestTaskResultStatisticsWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertFindLatestTaskResultStatisticsWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         for (StatisticInterval each : StatisticInterval.values()) {
             TaskResultStatistics actual = statisticManager.findLatestTaskResultStatistics(each);
@@ -196,7 +196,7 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertFindLatestTaskResultStatisticsWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertFindLatestTaskResultStatisticsWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         for (StatisticInterval each : StatisticInterval.values()) {
             when(rdbRepository.findLatestTaskResultStatistics(each))
@@ -209,13 +209,13 @@ public final class StatisticManagerTest {
     }
     
     @Test
-    public void assertFindTaskResultStatisticsDailyWhenRdbIsNotConfigured() throws NoSuchFieldException {
+    public void assertFindTaskResultStatisticsDailyWhenRdbIsNotConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null);
         assertTrue(statisticManager.findTaskResultStatisticsDaily().isEmpty());
     }
     
     @Test
-    public void assertFindTaskResultStatisticsDailyWhenRdbIsConfigured() throws NoSuchFieldException {
+    public void assertFindTaskResultStatisticsDailyWhenRdbIsConfigured() {
         ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository);
         when(rdbRepository.findTaskResultStatistics(any(Date.class), any(StatisticInterval.class)))
             .thenReturn(Lists.newArrayList(new TaskResultStatistics(10, 5, StatisticInterval.MINUTE, new Date())));
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticsSchedulerTest.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticsSchedulerTest.java
index 4808e61..926955f 100755
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticsSchedulerTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticsSchedulerTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.elasticjob.cloud.scheduler.statistics;
 
+import org.apache.shardingsphere.elasticjob.cloud.ReflectionUtils;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.statistics.job.StatisticJob;
 import org.apache.shardingsphere.elasticjob.cloud.scheduler.statistics.job.TestStatisticJob;
 import org.junit.Before;
@@ -26,7 +27,6 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
-import org.unitils.util.ReflectionUtils;
 
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -40,7 +40,7 @@ public class StatisticsSchedulerTest {
     private Scheduler scheduler;
     
     @Before
-    public void setUp() throws NoSuchFieldException {
+    public void setUp() {
         statisticsScheduler = new StatisticsScheduler();
         ReflectionUtils.setFieldValue(statisticsScheduler, "scheduler", scheduler);
     }
diff --git a/pom.xml b/pom.xml
index 2d2324e..e92d527 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,6 @@
         <h2.version>1.4.184</h2.version>
         <junit.version>4.12</junit.version>
         <mockito.version>2.7.21</mockito.version>
-        <unitils.core.version>3.4.2</unitils.core.version>
         
         <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
         <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
@@ -302,12 +301,6 @@
                 <scope>test</scope>
             </dependency>
             <dependency>
-                <groupId>org.unitils</groupId>
-                <artifactId>unitils-core</artifactId>
-                <version>${unitils.core.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-test</artifactId>
                 <version>${springframework.version}</version>