@Test
  public void testHandleFire_AlreadyProcessingRootJob() throws Exception {
    TestRootJob job = new TestRootJob();

    ExecJobState jobState = new ExecJobState(job, Id.nextValue(), sender);
    jobState.setStatus(JobState.Status.PROCESSING);
    workerState.addJobState(jobState);

    replayAll();

    RootJobFireHandler handler = new RootJobFireHandler(workerMock);

    handler.handleFire();

    verifyAll();
  }
  @Test
  public void testClone() throws Exception {
    TestJob job = new TestJob(TestJobProducerNoChildren.class);

    Address address = new Address("akka", "haka");
    final RootActorPath path = new RootActorPath(address, "path");

    ActorRef sender = new TestActorRefMock(path);

    ExecJobState jobState = new ExecJobState(job, Id.nextValue(), sender);

    ExecJobState cloned = jobState.clone();

    assertTrue(jobState != cloned);

    assertThat(jobState.getSender(), is(sender));
    assertThat(jobState.getJob().getId(), is(job.getId()));
  }