Corollaries.assumptionSort skips entries
I found that the assumptionSort method in Corollaries class skips over some methods resulting in a broken dependency tree for tests.
Regarding the source code snippet for this method: private void assumptionSort(List<FrameworkMethod> methods) { int size = methods.size(); for (int i = 0; i < size; i++) { FrameworkMethod m = methods.get(i); Assumes assumes = m.getAnnotation(Assumes.class); if (assumes != null) { Set<String> assumptions = new HashSet<String>(Arrays.asList(assumes.value())); for (int j = size - 1; j > i; j--) { if (assumptions.contains(methods.get(j).getName())) { methods.add(j, methods.remove(i)); break; } } } } }
Applying this change should fix it:
-methods.add(j, methods.remove(i)); +methods.add(j, methods.remove(i--));