Whenever we specify priority and dependsOnMethods on a @Test annotated method, the order of execution of test methods is not according
All independent methods (that do not have @dependsOnMethods dependency) will be executed first. Then methods with dependency will be executed. If there is ambiguity in execution order even after this ordering, priority comes into picture.
This is the ordering scheme:
Now all ambiguity is resolved since no two methods can have the same name.