Add @Order
annotation to your test methods:
@Test
@Order(0)
public void aRandomTestMethod_willBeExecutedFirst() { ... }
@Test
@Order(1)
public void anotherRandomTestMethod_willBeExecutedSecond() { ... }
Methods that are not annotated with @Order
will be executed (in undefined order) after the ones that are annotated.