@Parameters(name = "{0}")
    public static List<Object[]> data() throws Exception {
        List<Object[]> result = new ArrayList<>();

        Files.walkFileTree(
            root,
            new SimpleFileVisitor<Path>() {
                @Override
                public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {
                    String fileName = path.toString();

                    if (!fileName.endsWith(".class")) {
                        return super.visitFile(path, attrs);
                    }

                    if (!fileName.startsWith("/org/testcontainers/")) {
                        return super.visitFile(path, attrs);
                    }

                    if (fileName.startsWith("/" + SHADED_PACKAGE_PATH)) {
                        return super.visitFile(path, attrs);
                    }

                    try (InputStream inputStream = Files.newInputStream(path)) {
                        ClassReader reader = new ClassReader(inputStream);
                        ClassNode node = new ClassNode();
                        reader.accept(node, ClassReader.SKIP_CODE);
                        if ((node.access & Opcodes.ACC_PUBLIC) != 0) {
                            result.add(new Object[] { fileName, node });
                        }
                    }

                    return super.visitFile(path, attrs);
                }
            }
        );
        return result;
    }
This test checks that we don't expose any shaded class in our public API.
We use {@link Parameterized} runner here to create a test per public class in Testcontainers' JAR file.
core/src/jarFileTest/java/org/testcontainers/PublicBinaryAPITest.java