@Override public boolean isToBeProcessed(CtInvocation<?> candidate) { if (!candidate.getExecutable().getSimpleName().contains("assert")) { return false; } CtExecutableReference<?> executable = candidate.getExecutable(); CtPackageReference executablePackage = executable.getDeclaringType().getPackage(); if (executablePackage == null || !executablePackage.getSimpleName().contains("junit")) { return false; } CtMethod<?> parentMethod = candidate.getParent(CtMethod.class); if (parentMethod == null) { return false; } createExecutionMethod(candidate); return super.isToBeProcessed(candidate); /* * boolean found = false; for (TestCase testCase : faillingTest) { if * (testCase.className().equals(parentClass.getQualifiedName())) { if * (testCase.testName().equals(parentMethod.getSimpleName())) { found = * true; break; } } } * * return found; */ }