1 package user.jobengine.server.actions;
3 import org.jmock.Expectations;
6 import user.commons.JobStatus;
8 public class SuspendWaitExecutorActionTest extends ActionTest {
11 public void testProcessAction() throws Exception {
13 final IJobStatusAction sut = new SuspendWaitExecutorAction();
14 context.checking(new Expectations() {{
15 one (jobRuntime).setStatus(JobStatus.RUNABLE);
16 one (jobRuntime).saveStatus();
17 one (jobRuntime).setStatus(JobStatus.SUSPENDED);
18 one (jobRuntime).restoreStack();
19 one (jobRuntime).decrementInstructionPointer();
20 one (jobEngine).removeFromExecutorQueue(jobRuntime);
24 sut.processAction(jobEngine, jobRuntime);