/*
 * 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.shardingproxy.frontend.common;

import io.shardingsphere.core.constant.DatabaseType;
import io.shardingsphere.shardingproxy.frontend.mysql.MySQLFrontendHandler;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.junit.Assert.assertThat;

public final class FrontendHandlerFactoryTest {
    
    @Test
    public void assertCreateFrontendHandlerInstanceWithMySQL() {
        assertThat(FrontendHandlerFactory.createFrontendHandlerInstance(DatabaseType.MySQL, null), instanceOf(MySQLFrontendHandler.class));
    }
    
    @Test(expected = UnsupportedOperationException.class)
    public void assertCreateFrontendHandlerInstanceWhenUnsupported() {
        FrontendHandlerFactory.createFrontendHandlerInstance(DatabaseType.Oracle, null);
    }
}

@@ -753,226 +753,792 @@
 ere.
-shardingproxy.frontend.mysql.MySQLFrontendHandler;%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.CoreMatchers.instanceOf;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic final class FrontendHandlerFactoryTest %7B
+core.constant.properties.ShardingProperties;%0Aimport io.shardingsphere.shardingproxy.frontend.mysql.MySQLFrontendHandler;%0Aimport io.shardingsphere.shardingproxy.runtime.GlobalRegistry;%0Aimport lombok.SneakyThrows;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.lang.reflect.Field;%0Aimport java.util.Properties;%0A%0Aimport static org.hamcrest.CoreMatchers.instanceOf;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic final class FrontendHandlerFactoryTest %7B%0A    %0A    @BeforeClass%0A    @SneakyThrows%0A    public static void beforeClass() %7B%0A        Field field = GlobalRegistry.getInstance().getClass().getDeclaredField(%22shardingProperties%22);%0A        field.setAccessible(true);%0A        field.set(GlobalRegistry.getInstance(), new ShardingProperties(new Properties()));%0A    %7D
 %0A   

Resolve test error for FrontendHandlerFactoryTest.