import org.junit.rules.ExternalResource;

public class ClearRule extends ExternalResource {

  protected void before() {
   }

  protected void after() {
    App.clear();
    //any other classes go here
  }
}

//ONLY TO BE USED IF STORING SESSION DATA IN SPARK

// import org.junit.rules.ExternalResource;
//
// public class ClearRule extends ExternalResource {
//
//   protected void before() {
//    }
//
//   protected void after() {
//     App.clear();
//     //any other classes go here
//   }
// }

comment out all clear rules by default