title: Specifying order of execution in JUnit test case
body: <p>I have a test case where I add an entity, update it and delete the same.  Hence, the order of execution is important here. I want it to be :</p>
  
  <ol>
  <li>Create</li>
  <li>Update</li>
  <li>Delete </li>
  </ol>
  
  <p>Strangely, for just one test case ( out of 15) , JUnit executes it in the following order :</p>
  
  <ol>
  <li>Delete</li>
  <li>Update</li>
  <li>Create  . </li>
  </ol>
  
  <p>How do I tell JUnit  to execute them in a specific order ? In other cases, JUnit works totally fine ( executing serially ) . And why does JUnit behave weirdly in this one case ? </p>
  
  <p>Relevant code snippet below : </p>
  
  <pre><code>    private static Date date;
      private static int entity;
      static Parking p;
      public ParkingTests(String name) {
         super(name);
      }
      public void testAdd() throws Exception {
             //Add code here
      }
      public void testUpdate() throws Exception {
              //update code here
      }
      public void testDelete() throws Exception {
              //delete code here
      }
    }
  </code></pre>
  
  <p>It gets weirder. I run a lot of test cases as part of a suite.  If I run just the Parking case, the order is maintained. If I run it along with others, it is sometimes maintained, sometimes not !  </p>