@@ -0,0 +1,2347 @@
+/*%0A * Copyright 1999-2018 Alibaba Group Holding Ltd.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.alibaba.nacos.config.server.remote;%0A%0Aimport com.alibaba.nacos.api.config.remote.request.ConfigPublishRequest;%0Aimport com.alibaba.nacos.api.config.remote.response.ConfigPublishResponse;%0Aimport com.alibaba.nacos.api.exception.NacosException;%0Aimport com.alibaba.nacos.api.remote.request.RequestMeta;%0Aimport com.alibaba.nacos.api.remote.response.ResponseCode;%0Aimport com.alibaba.nacos.config.server.service.repository.PersistService;%0Aimport com.alibaba.nacos.sys.env.EnvUtil;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.MockitoJUnitRunner;%0Aimport org.springframework.core.env.StandardEnvironment;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class ConfigPublishRequestHandlerTest %7B%0A    %0A    private ConfigPublishRequestHandler configPublishRequestHandler;%0A    %0A    @Mock%0A    private PersistService persistService;%0A    %0A    @Before%0A    public void setUp() %7B%0A        configPublishRequestHandler = new ConfigPublishRequestHandler(persistService);%0A        EnvUtil.setEnvironment(new StandardEnvironment());%0A    %7D%0A    %0A    @Test%0A    public void testHandle() throws NacosException %7B%0A        ConfigPublishRequest configPublishRequest = new ConfigPublishRequest();%0A        configPublishRequest.setDataId(%22dataId%22);%0A        configPublishRequest.setGroup(%22group%22);%0A        configPublishRequest.setContent(%22content%22);%0A        RequestMeta requestMeta = new RequestMeta();%0A        requestMeta.setClientIp(%22127.0.0.1%22);%0A        ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta);%0A        Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode());%0A    %7D%0A%7D

Add unit tests for class ConfigPublishRequestHandlerTest in nacos 2.0