mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testTestExecuteScheduled() throws MissionProgramException, InterruptedException, ExecutionException
    {
        ProgramImpl program = createProgram("test");
        ArgumentCaptor<ProgramImpl> arguments = ArgumentCaptor.forClass(ProgramImpl.class);

        //change the status and try again
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        program.changeStatus(ProgramStatus.SCHEDULED);
        
        @SuppressWarnings("unchecked")
        Future<TestResult> future = mock(Future.class);
        when(future.get()).thenReturn(TestResult.PASSED);
        
        doReturn(future).when(m_Manager).testProgram(program);
        
        program.executeTest();
        verify(m_Manager).testProgram(arguments.capture());
        assertThat(arguments.getValue().getExecParams().size(), is(0));
    }
/**
     * Test that the program can be manually test executed.
     * 
     * Verify that if script initialization does not take place that the program will not execute.
     */
Test that the program can be manually test executed.

Verify that if script initialization does not take place that the program will not execute.
Test that the program can be manually test executed . Verify that if script initialization does not take place that the program will not execute .
@Test
    public void testTestExecuteScheduled() throws MissionProgramException, InterruptedException, ExecutionException
    {
        ProgramImpl program = createProgram("test");
        ArgumentCaptor<ProgramImpl> arguments = ArgumentCaptor.forClass(ProgramImpl.class);
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        program.changeStatus(ProgramStatus.SCHEDULED);
        @SuppressWarnings("unchecked")
        Future<TestResult> future = mock(Future.class);
        when(future.get()).thenReturn(TestResult.PASSED);
        doReturn(future).when(m_Manager).testProgram(program);
        program.executeTest();
        verify(m_Manager).testProgram(arguments.capture());
        assertThat(arguments.getValue().getExecParams().size(), is(0));
    }
@ Test public void testTestExecuteScheduled ( ) throws MissionProgramException , InterruptedException , ExecutionException { ProgramImpl program = createProgram ( "test" ) ; ArgumentCaptor < ProgramImpl > arguments = ArgumentCaptor . forClass ( ProgramImpl . class ) ; program . changeStatus ( ProgramStatus . WAITING_INITIALIZED ) ; program . changeStatus ( ProgramStatus . SCHEDULED ) ; @ SuppressWarnings ( "unchecked" ) Future < TestResult > future = mock ( Future . class ) ; when ( future . get ( ) ) . thenReturn ( TestResult . PASSED ) ; doReturn ( future ) . when ( m_Manager ) . testProgram ( program ) ; program . executeTest ( ) ; verify ( m_Manager ) . testProgram ( arguments . capture ( ) ) ; assertThat ( arguments . getValue ( ) . getExecParams ( ) . size ( ) , is ( 0 ) ) ; }
Test that the program can be manually test executed.
Test that the program can be manually test executed .
//change the status and try again