public List<ColumnMatchResult<?>> getMismatchedColumns(List<Column> columns, ChecksumResult controlChecksum, ChecksumResult testChecksum)
    {
        return columns.stream()
                .flatMap(column -> columnValidators.get(column.getCategory()).get().validate(column, controlChecksum, testChecksum).stream())
                .filter(columnMatchResult -> !columnMatchResult.isMatched())
                .collect(toImmutableList());
    }
@Test
    public void testMapNoValuesCheckSum()
    {
        List<Column> columns = ImmutableList.of(MAP_COLUMN);

        // Match.
        Map<String, Object> countsBase = new HashMap<>(4);
        countsBase.put("map$checksum", new SqlVarbinary(new byte[] {0xa}));
        countsBase.put("map$keys_checksum", new SqlVarbinary(new byte[] {0xb}));
        countsBase.put("map$cardinality_sum", 3L);
        countsBase.put("map$cardinality_checksum", new SqlVarbinary(new byte[] {0xd}));
        ChecksumResult controlChecksumBase = new ChecksumResult(5, countsBase);
        assertTrue(checksumValidator.getMismatchedColumns(columns, controlChecksumBase, controlChecksumBase).isEmpty());

        // Mismatch in checksum.
        Map<String, Object> countsA = new HashMap<>(5);
        countsA.put("map$checksum", new SqlVarbinary(new byte[] {0xb}));
        countsA.put("map$keys_checksum", new SqlVarbinary(new byte[] {0xb}));
        countsA.put("map$values_checksum", null);
        countsA.put("map$cardinality_sum", 3L);
        countsA.put("map$cardinality_checksum", new SqlVarbinary(new byte[] {0xd}));
        ChecksumResult controlChecksumA = new ChecksumResult(5, countsA);
        assertMismatchedColumns(columns, controlChecksumBase, controlChecksumA, MAP_COLUMN);

        // Mismatch in cardinality sum.
        Map<String, Object> countsB = new HashMap<>(4);
        countsB.put("map$checksum", new SqlVarbinary(new byte[] {0xa}));
        countsB.put("map$keys_checksum", new SqlVarbinary(new byte[] {0xb}));
        countsB.put("map$cardinality_sum", 4L);
        countsB.put("map$cardinality_checksum", new SqlVarbinary(new byte[] {0xd}));
        ChecksumResult controlChecksumB = new ChecksumResult(5, countsB);
        assertMismatchedColumns(columns, controlChecksumBase, controlChecksumB, MAP_COLUMN);
    }