/*
 * 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 io.shardingsphere.core.yaml.sharding;

import io.shardingsphere.api.config.KeyGeneratorConfiguration;
import org.junit.Before;

import java.util.Properties;

public class YamlKeyGeneratorConfigurationTest {
    
    private KeyGeneratorConfiguration keyGeneratorConfiguration;
    
    @Before
    public void setUp() {
        Properties props = new Properties();
        props.setProperty("key1", "value1");
        keyGeneratorConfiguration = new KeyGeneratorConfiguration("order_id", "UUID", null, props);
    }

}

@@ -747,16 +747,39 @@
 .Before;
+%0Aimport org.junit.Test;
 %0A%0Aimport
@@ -802,16 +802,104 @@
 rties;%0A%0A
+import static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A
 public c
@@ -1248,11 +1248,371 @@
 ;%0A    %7D%0A
+    %0A    @Test%0A    public void createYamlKeyGeneratorConfiguration() %7B%0A        YamlKeyGeneratorConfiguration yamlKeyGeneratorConfiguration = new YamlKeyGeneratorConfiguration(keyGeneratorConfiguration);%0A        assertThat(yamlKeyGeneratorConfiguration.getColumn(), is(%22order_id%22));%0A        assertThat(yamlKeyGeneratorConfiguration.getType(), is(%22UUID%22));%0A    %7D
 %0A%7D%0A

add createYamlKeyGeneratorConfiguration()