@@ -0,0 +1,1799 @@
+package com.continuuity.internal.app.scheduler;%0A%0Aimport com.continuuity.app.Id;%0Aimport com.continuuity.app.services.AppFabricService;%0Aimport com.continuuity.app.services.AuthToken;%0Aimport com.continuuity.app.services.ProgramId;%0Aimport com.continuuity.app.services.ProgramRunRecord;%0Aimport com.continuuity.internal.app.services.AppFabricServer;%0Aimport com.continuuity.test.internal.TestHelper;%0Aimport com.continuuity.weave.filesystem.LocalLocationFactory;%0Aimport junit.framework.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.List;%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * Schedule pause and run%0A */%0Apublic class SchedulePauseResumeTests %7B%0A%0A  @Test%0A  public void testRunner() throws Exception %7B%0A    AppFabricServer appFabricServer = TestHelper.getInjector().getInstance(AppFabricServer.class);%0A%0A    try %7B%0A      appFabricServer.startAndWait();%0A      AppFabricService.Iface appFabricService = TestHelper.getInjector().getInstance(AppFabricService.Iface.class);%0A%0A      TestHelper.deployApplication(appFabricService, new LocalLocationFactory(),%0A                                   Id.Account.from(%22schedulePauseTester%22), new AuthToken(%22token%22), %22SampleApplication%22,%0A                                   %22SampleApp%22, SampleApplication.class);%0A%0A      ProgramId id  = new ProgramId(%22schedulePauseTester%22, %22SampleApp%22, %22SampleWorkflow%22);%0A      int count = 0;%0A      int workflowRunCount = 0;%0A      //Wait for 90 seconds or until there is one run of the workflow%0A      while (count %3C= 90 && workflowRunCount == 0) %7B%0A        count++;%0A        List%3CProgramRunRecord%3E result = appFabricService.getHistory(id);%0A        workflowRunCount = result.size();%0A        TimeUnit.SECONDS.sleep(1L);%0A      %7D%0A      Assert.assertTrue(workflowRunCount %3E= 1);%0A%0A    %7D finally %7B%0A      appFabricServer.stopAndWait();%0A    %7D%0A  %7D%0A%7D%0A

Add tests