private void loadTestPlans(Class<?> testClass) throws InitializationError {
        try {
            ManagerRestTestPlan annotation = testClass.getAnnotation(ManagerRestTestPlan.class);
            if (annotation == null) {
                Method[] methods = testClass.getMethods();
                TreeSet<ManagerRestTestPlan> annotations = new TreeSet<>(new Comparator<ManagerRestTestPlan>() {
                    @Override
                    public int compare(ManagerRestTestPlan o1, ManagerRestTestPlan o2) {
                        Integer i1 = o1.order();
                        Integer i2 = o2.order();
                        return i1.compareTo(i2);
                    }
                });
                for (Method method : methods) {
                    annotation = method.getAnnotation(ManagerRestTestPlan.class);
                    if (annotation != null) {
                        annotations.add(annotation);
                    }
                }
                for (ManagerRestTestPlan anno : annotations) {
                    TestPlanInfo planInfo = new TestPlanInfo();
                    planInfo.planPath = anno.value();
                    planInfo.name = new File(planInfo.planPath).getName();
                    planInfo.endpoint = TestUtil.doPropertyReplacement(anno.endpoint());
                    planInfo.plan = TestUtil.loadTestPlan(planInfo.planPath, testClass.getClassLoader());
                    testPlans.add(planInfo);
                }
            } else {
                TestPlanInfo planInfo = new TestPlanInfo();
                planInfo.planPath = annotation.value();
                planInfo.name = new File(planInfo.planPath).getName();
                planInfo.plan = TestUtil.loadTestPlan(planInfo.planPath, testClass.getClassLoader());
                planInfo.endpoint = TestUtil.doPropertyReplacement(annotation.endpoint());
                testPlans.add(planInfo);
            }
        } catch (Throwable e) {
            throw new InitializationError(e);
        }

        if (testPlans.isEmpty()) {
            throw new InitializationError("No @ManagerRestTestPlan annotations found on test class: " + testClass);
        }
    }
Loads the test plans.
@param testClass
@throws InitializationError
manager/test/api/src/main/java/io/apiman/manager/test/junit/ManagerRestTester.java