/*
 * Copyright 2017, TeamDev Ltd. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.spine.server.storage.jdbc;

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;

import javax.sql.DataSource;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import static io.spine.Identifier.newUuid;
import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class GivenDataSource {

    public static final String DEFAULT_TABLE_NAME = "test";

    /**
     * The URL prefix of an in-memory HyperSQL DB.
     */
    //TODO:2017-09-13:dmytro.grankin: Enable flexible configuration of drivers.
    // See the details: https://github.com/SpineEventEngine/jdbc-storage/issues/37
    private static final String HSQL_IN_MEMORY_DB_URL_PREFIX = "jdbc:h2:mem:";

    private GivenDataSource() {
    }

    public static DataSourceWrapper withoutSuperpowers() {
        return mock(DataSourceWrapper.class);
    }

    public static ClosableDataSource whichIsAutoCloseable() {
        return mock(ClosableDataSource.class);
    }

    public static DataSourceWrapper whichIsStoredInMemory(String dbName) {
        final HikariConfig config = new HikariConfig();
        final String dbUrl = prefix(dbName);
        config.setJdbcUrl(dbUrl);
        // not setting username and password is OK for in-memory database
        final DataSourceWrapper dataSource = DataSourceWrapper.wrap(new HikariDataSource(config));
        return dataSource;
    }

    public static String prefix(String dbNamePrefix) {
        return HSQL_IN_MEMORY_DB_URL_PREFIX + dbNamePrefix + newUuid();
    }

    @SuppressWarnings("InterfaceNeverImplemented")
    public interface ClosableDataSource extends DataSource, AutoCloseable {
    }
}

@@ -1521,69 +1521,8 @@
  %7B%0A%0A
-    public static final String DEFAULT_TABLE_NAME = %22test%22;%0A%0A
     

Remove the unused field from `GivenDataSource`