@Nonnull
    @Override
    public List<DataConnectionResource> listResources() {
        try {
            try (Connection connection = getConnection()) {
                DatabaseMetaData databaseMetaData = connection.getMetaData();

                ResourceReader reader = new ResourceReader();
                switch (resolveDialect(databaseMetaData)) {
                    case H2:
                        reader.withCatalog(connection.getCatalog())
                                .exclude(
                                        (catalog, schema, table) ->
                                                H2_SYSTEM_SCHEMA_LIST.contains(schema)
                                );
                        break;

                    case POSTGRESQL:
                        reader.withCatalog(connection.getCatalog());
                        break;

                    case MYSQL:
                        reader.exclude(
                                (catalog, schema, table) ->
                                        catalog != null && MYSQL_SYSTEM_CATALOG_LIST.contains(catalog.toUpperCase(ROOT))
                        );
                        break;

                    case MICROSOFT_SQL_SERVER:
                        reader
                                .withCatalog(connection.getCatalog())
                                .exclude(
                                        (catalog, schema, table) ->
                                                MSSQL_SYSTEM_SCHEMA_LIST.contains(schema)
                                                || MSSQL_SYSTEM_TABLE_LIST.contains(table)
                                );
                        break;

                    default:
                        // Nothing to do
                }

                return reader.listResources(connection);
            }
        } catch (Exception exception) {
            throw new HazelcastException("Could not read resources for DataConnection " + getName(), exception);
        }
    }
@Test
    public void list_resources_should_return_view() throws Exception {
        jdbcDataConnection = new JdbcDataConnection(SHARED_DATA_CONNECTION_CONFIG);

        executeJdbc(JDBC_URL_SHARED, "CREATE TABLE MY_TABLE (ID INT, NAME VARCHAR)");
        executeJdbc(JDBC_URL_SHARED, "CREATE VIEW MY_TABLE_VIEW AS SELECT * FROM MY_TABLE");

        List<DataConnectionResource> dataConnectionResources = jdbcDataConnection.listResources();
        assertThat(dataConnectionResources).contains(
                new DataConnectionResource("TABLE", DB_NAME_SHARED, "PUBLIC", "MY_TABLE_VIEW")
        );
    }