We can set priority to a test and also define upon which test ,this test dependes upon as below.
@Test(priority=2,dependsOnMethods={"TestLogin"})