In single class we can write number of @test methods. And execution order of these @test methods are not difined. It means execution of test case is not depend on any other test case execution order.
Now some time we want test case execution in predefined order. So to achieve this we use parameter 'priority' in @Test
Low number priority means highest priority 0>1>2>3 etc....
@Test(priority = 0) ---case1
@Test(priority = 2) ---case2
@Test(priority = 1) ---case3
@Test(priority = 3) ---case4
Execution order will be::
case1
case3
case2
case4
test case2 will never run before case3 and case0. Same with case4