@Override
    protected List<Object[]> rows() {
        List<Object[]> rows = new ArrayList<>(mappings.size());
        for (Mapping mapping : mappings) {
            List<MappingField> fields = mapping.fields();
            for (int i = 0; i < fields.size(); i++) {
                MappingField field = fields.get(i);
                Object[] row = new Object[]{
                        catalog(),
                        schema,
                        mapping.name(),
                        field.name(),
                        field.externalName(),
                        i + 1,
                        String.valueOf(true),
                        field.type().getTypeFamily().toString()
                };
                rows.add(row);
            }
        }
        for (View view : views) {
            for (int i = 0; i < view.viewColumnNames().size(); i++) {
                Object[] row = new Object[]{
                        catalog(),
                        schema,
                        view.name(),
                        view.viewColumnNames().get(i),
                        null,
                        i + 1,
                        String.valueOf(true),
                        view.viewColumnTypes().get(i).getTypeFamily().name()
                };
                rows.add(row);
            }
        }
        return rows;
    }
@Test
    public void test_rows() {
        // given
        Mapping mapping = new Mapping(
                "table-name",
                "table-external-name",
                null,
                "table-type",
                null,
                singletonList(new MappingField("table-field-name", INT, "table-field-external-name")),
                emptyMap());
        View view = new View("view-name", "select * from table-name", singletonList("col1"), singletonList(INT));
        MappingColumnsTable mappingColumnsTable =
                new MappingColumnsTable("catalog", null, "schema", singletonList(mapping), singletonList(view));

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

        // then
        assertThat(rows).containsExactlyInAnyOrder(
                new Object[]{
                        "catalog",
                        "schema",
                        "table-name",
                        "table-field-name",
                        "table-field-external-name",
                        1,
                        "true",
                        "INTEGER"
                },
                new Object[]{
                        "catalog",
                        "schema",
                        "view-name",
                        "col1",
                        null,
                        1,
                        "true",
                        "INTEGER"
                }
        );
    }