/*
 * Copyright 2016-2018 shardingsphere.io.
 * <p>
 * Licensed 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.
 * </p>
 */

package org.apache.shardingsphere.shardingjdbc.orchestration.internal.datasource;

import org.junit.Before;
import org.junit.Test;

public class OrchestrationMasterSlaveDataSourceTest {
    
    private OrchestrationMasterSlaveDataSource masterSlaveDataSource;
    
    @Before
    public void setUp() {
        
    }
    
    @Test
    public void assertRenewRule() {
    }
    
    @Test
    public void assertRenewDataSource() {
    }
    
    @Test
    public void assertRenewProperties() {
    }
    
    @Test
    public void assertRenewConfigMap() {
    }
    
    @Test
    public void assertRenewDisabledState() {
    }
    
    @Test
    public void assertRenewCircuitState() {
    }
    
    @Test
    public void assertGetDataSource() {
    }
}

@@ -696,16 +696,468 @@
 ource;%0A%0A
+import lombok.SneakyThrows;%0Aimport org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;%0Aimport org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;%0Aimport org.apache.shardingsphere.shardingjdbc.api.yaml.YamlMasterSlaveDataSourceFactory;%0Aimport org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.MasterSlaveDataSource;%0Aimport org.apache.shardingsphere.shardingjdbc.orchestration.user.YamlUserTest;%0A
 import o
@@ -1173,16 +1173,16 @@
 Before;%0A
-
 import o
@@ -1197,16 +1197,38 @@
 .Test;%0A%0A
+import java.io.File;%0A%0A
 public c
@@ -1365,16 +1365,34 @@
 @Before%0A
+    @SneakyThrows%0A
     publ
@@ -1413,16 +1413,16 @@
 ) %7B%0A
-
         
 %0A   
@@ -1413,24 +1413,634 @@
 ) %7B%0A        
+masterSlaveDataSource = new OrchestrationMasterSlaveDataSource(getMasterSlaveDataSource(), getOrchestrationConfiguration());%0A        %0A    %7D%0A    %0A    @SneakyThrows%0A    private MasterSlaveDataSource getMasterSlaveDataSource() %7B%0A        File yamlFile = new File(YamlUserTest.class.getResource(%22/yaml/unit/masterSlave.yaml%22).toURI());%0A        return (MasterSlaveDataSource) YamlMasterSlaveDataSourceFactory.createDataSource(yamlFile);%0A    %7D%0A    %0A    private OrchestrationConfiguration getOrchestrationConfiguration() %7B%0A        return new OrchestrationConfiguration(%22test%22, new RegistryCenterConfiguration(), true);
 %0A    %7D%0A    %0A

add getMasterSlaveDataSource()