Iterable<Resource> (String path, String suffix) { Iterable<Resource> resources = super.resources(path, suffix); if (!TestCaseLoader.shouldBucketTests() || !".feature".equals(suffix)) { return resources; } List<Resource> result = new ArrayList<>(); for (Resource resource : resources) { if (TestCaseLoader.matchesCurrentBucket(resource.getPath())) { result.add(resource); } } return result; }