@Override
    protected List<Object[]> rows() {
        List<Object[]> rows = new ArrayList<>(mappings.size());
        for (Mapping mapping : mappings) {
            Map<String, String> options;
            if (!securityEnabled) {
                options = mapping.options();
            } else {
                options = new TreeMap<>();
                final SqlConnector sqlConnector = sqlConnectorCache.forType(mapping.connectorType());
                final Set<String> secureConnectorOptions = sqlConnector.nonSensitiveConnectorOptions();
                for (Entry<String, String> e : mapping.options().entrySet()) {
                    if (secureConnectorOptions.contains(e.getKey())) {
                        options.put(e.getKey(), e.getValue());
                    }
                }
            }
            Object[] row = new Object[]{
                    catalog(),
                    mappingsSchema,
                    mapping.name(),
                    quoteCompoundIdentifier(mapping.externalName()),
                    Optional.ofNullable(mapping.dataConnection())
                            .map(dataConnectionTypeResolver)
                            .orElse(mapping.connectorType()),
                    uncheckCall(() -> JsonUtil.toJson(options))
            };
            rows.add(row);
        }
        return rows;
    }
@Test
    public void test_rows_security_enabled() {
        // given
        Mapping mapping = new Mapping(
                "table-name",
                new String[]{"external-schema", "table-external-name"},
                null,
                "IMap",
                null,
                emptyList(),
                singletonMap("key", "value")
        );

        MappingsTable mappingTable = new MappingsTable(
                "catalog",
                null,
                "table-schema",
                singletonList(mapping),
                mock(SqlConnectorCache.class, RETURNS_MOCKS),
                (s) -> fail("Should not be invoked"), true);

        // when
        List<Object[]> rows = mappingTable.rows();

        // then
        assertThat(rows).containsExactly(new Object[]{
                "catalog"
                , "table-schema"
                , "table-name"
                , "\"external-schema\".\"table-external-name\""
                , "IMap"
                , "{}"
        });
    }