/*
 * 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.transaction.core.handler;

import io.shardingsphere.core.constant.DatabaseType;
import io.shardingsphere.transaction.api.TransactionType;
import io.shardingsphere.transaction.core.manager.ShardingTransactionManager;

import javax.sql.DataSource;
import java.sql.Connection;
import java.util.Map;

import static org.mockito.Mockito.mock;

/**
 * Fixed sharding transaction handler.
 *
 * @author zhaojun
 */
public final class FixedShardingTransactionHandler extends ShardingTransactionHandlerAdapter {
    
    @Override
    public ShardingTransactionManager getShardingTransactionManager() {
        return mock(ShardingTransactionManager.class);
    }
    
    @Override
    public TransactionType getTransactionType() {
        return null;
    }
    
    @Override
    public void registerTransactionalResource(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap) {
    
    }
    
    @Override
    public void clearTransactionalResource() {
    
    }
    
    @Override
    public Connection createConnection(final String dataSourceName, final DataSource dataSource) {
        return null;
    }
}

@@ -1142,24 +1142,137 @@
 pter %7B%0A    %0A
+    private ShardingTransactionManager shardingTransactionManager = mock(ShardingTransactionManager.class);%0A    %0A
     @Overrid
@@ -1265,32 +1265,32 @@
  %0A    @Override%0A
-
     public Shard
@@ -1360,22 +1360,17 @@
  return 
-mock(S
+s
 hardingT
@@ -1382,31 +1382,24 @@
 ctionManager
-.class)
 ;%0A    %7D%0A    

fix test error.