protected void assertHeaders(String xml, boolean isTH, boolean hasLabel, boolean hasName) {
        // Find the first row
        int splitAt = xml.indexOf("</tr>");
        String hRow = xml.substring(0, splitAt);
        splitAt = xml.indexOf("<tr>");
        hRow = hRow.substring(splitAt + 4);

        // Split into cells, ignoring stuff before first cell
        String[] cells = toCells(hRow, isTH);

        // Check we got the right number
        assertEquals(columnLabels.length, cells.length,
                "Wrong number of cells in header row " + hRow);

        // Check we got the right stuff
        for (int i = 0; i < cells.length; i++) {
            if (hasLabel && hasName) {
                assertContains("title=\"" + columnNames[i] + "\"", cells[i]);
                assertContains(">" + columnLabels[i], cells[i]);
            } else if (hasName) {
                assertContains(">" + columnNames[i], cells[i]);
            } else {
                assertContains(">" + columnLabels[i], cells[i]);
            }
        }
    }
Expected values, by <em>column</em>
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/TabularFormatsTest.java