public boolean isFinished() {
    return finished;
  }
@Test
  public void testIsFinished() throws Exception {
    assertFalse( jobRunner.isFinished() );
    when( mockJob.isStopped() ).thenReturn( false );
    when( mockJob.getParentJob() ).thenReturn( parentJob );
    when( parentJob.isStopped() ).thenReturn( false );
    when( mockJob.execute( Mockito.anyInt(), Mockito.any( Result.class ) ) ).thenReturn( mockResult );
    jobRunner.run();
    assertTrue( jobRunner.isFinished() );
  }