@Override
    public void checkBeforeUpdate(final LoadSingleTableStatement sqlStatement) {
        checkStorageUnits(sqlStatement);
        String defaultSchemaName = new DatabaseTypeRegistry(database.getProtocolType()).getDefaultSchemaName(database.getName());
        checkDuplicatedTables(sqlStatement, defaultSchemaName);
        checkActualTableExist(sqlStatement, defaultSchemaName);
    }
@Test
    void assertCheckWithDuplicatedTables() {
        when(database.getName()).thenReturn("foo_db");
        when(schema.containsTable("foo")).thenReturn(true);
        when(database.getResourceMetaData().getNotExistedDataSources(any())).thenReturn(Collections.emptyList());
        LoadSingleTableStatement sqlStatement = new LoadSingleTableStatement(Collections.singleton(new SingleTableSegment("ds_0", null, "foo")));
        executor.setDatabase(database);
        assertThrows(TableExistsException.class, () -> executor.checkBeforeUpdate(sqlStatement));
    }