protected void assertUploadedFiles(DataTable uploadedFiles, File... files) {
        assertNotNull(uploadedFiles);
        assertNotNull(uploadedFiles.getRows());
        String expectedFiles = Arrays.stream(files).map(f -> f.getName())
                .collect(Collectors.joining(","));
        String actualFiles = uploadedFiles.getRows().stream().map(r -> r.getCell(0).getText())
                .collect(Collectors.joining(","));
        String diag = expectedFiles + " <> " + actualFiles;
        assertEquals(files.length, uploadedFiles.getRows().size(), diag);

        // sequence is not guaranteed to be the same, so sort by name and size
        Arrays.sort(files, (f1, f2) -> {
            int res = f1.getName().compareTo(f2.getName());
            res = res == 0 ? (int) (f1.length() - f2.length()) : res;
            return res;
        });
        List<Row> rows = new ArrayList<>(uploadedFiles.getRows());
        rows.sort((f1, f2) -> {
            int res = f1.getCell(0).getText().compareTo(f2.getCell(0).getText());
            res = res == 0 ? (int) (Long.parseLong(f1.getCell(1).getText()) - Long.parseLong(f1.getCell(1).getText())) : res;
            return res;
        });
        for (int f = 0; f < files.length; ++f) {
            Row row = rows.get(f);
            assertEquals(files[f].getName(), row.getCell(0).getText()); // same file name
            assertEquals(files[f].length(), Long.parseLong(row.getCell(1).getText())); // same file size
        }
    }
Uploaded files are displayed in a data table with columns name and size.
@param uploadedFiles the data tble to check against
@param files the (client side) files uploaded
primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/fileupload/AbstractFileUploadTest.java