@@ -0,0 +1,713 @@
+package hu.pazsitz.pacuse.tests.cucumber.featuretables;%0A%0Aimport java.util.Comparator;%0A%0Apublic class PriorityAnnotationComparator implements Comparator%3CAnnotatedWebElement%3E %7B%0A%0A%09/**%0A%09 * Sorts AnnotatedWebElement %0A%09 * compares by priority %0A%09 * or if their have equal priority %0A%09 * compares by object hashcode%0A%09 * (As we use them as Map keys we need unique elements)%0A%09 */%0A%09@Override%0A%09public int compare(AnnotatedWebElement element1, AnnotatedWebElement element2) %7B%0A%09%09if (element1.getFieldAnnotation().priority() == element2.getFieldAnnotation().priority())  %7B%0A%09%09%09return element1.hashCode() - element2.hashCode();%0A%09%09%7D%0A%09%09return element1.getFieldAnnotation().priority() - element2.getFieldAnnotation().priority();%0A%09%7D%0A%0A%7D%0A

add custom WebElement annotation priority comparator