private static void resetDatabase() throws DataStoreException{

        try{
            if ( ! Configuration.isConfigured() ){
                URL testFile = MySQLConnectorTest.class.getResource("test.conf");
                Configuration.load(new File(testFile.toURI()));
            }
            loadDBConfiguration();
        } catch (NotConfiguredException | URISyntaxException | IOException e) {
            //If we get here we are unable to load the configuration file, so test setup is wrong.
            throw new RuntimeException(e);
        }

        try(
            Connection conn = DriverManager.getConnection("jdbc:mysql://" + host + ":" +
                    port + "/" + database + "?user=" +
                    username + "&password=" + password +
                    "&default-character-set=utf8") ){

            Statement resetStatement = conn.createStatement();
            for(String statement: sqlResetBatch){
                resetStatement.addBatch(statement);
            }
            for(String statement: sqlInsertBatch){
                resetStatement.addBatch(statement);
            }
            resetStatement.executeBatch();

            MySQLConnector.getInstance().invalidateCaches();
        } catch (SQLException | NotConfiguredException | ConnectionException e){
            //If we get here we are unable to load the configuration file, so test setup is wrong.
            throw new RuntimeException(e);
        }
    }