mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testRemove()
    {
        ProgramImpl program = createProgram("test");
        program.remove();
        verify(m_Manager).removeProgram(eq(program), Mockito.any(UUID.class));
        
        //now try with the program in an illegal state
        program.changeStatus(ProgramStatus.WAITING_UNINITIALIZED);
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        program.changeStatus(ProgramStatus.EXECUTING);
        
        try
        {
            program.remove();
            fail("Expecting exception because once a script is initialized the deps are bound to the mission. They"
                + "need to be released.");
        }
        catch (IllegalStateException e)
        {
            //expecting exception
        }
        //make sure the mission program manager is never called again.
        verify(m_Manager).removeProgram(eq(program), Mockito.any(UUID.class));
    }
/**
     * Test removing the program. 
     * 
     * Verify Mission Program Manager is interacted with to remove the program from store of managed programs.
     */
Test removing the program.

Verify Mission Program Manager is interacted with to remove the program from store of managed programs.
Test removing the program . Verify Mission Program Manager is interacted with to remove the program from store of managed programs .
@Test
    public void testRemove()
    {
        ProgramImpl program = createProgram("test");
        program.remove();
        verify(m_Manager).removeProgram(eq(program), Mockito.any(UUID.class));
        program.changeStatus(ProgramStatus.WAITING_UNINITIALIZED);
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        program.changeStatus(ProgramStatus.EXECUTING);
        try
        {
            program.remove();
            fail("Expecting exception because once a script is initialized the deps are bound to the mission. They"
                + "need to be released.");
        }
        catch (IllegalStateException e)
        {
        }
        verify(m_Manager).removeProgram(eq(program), Mockito.any(UUID.class));
    }
@ Test public void testRemove ( ) { ProgramImpl program = createProgram ( "test" ) ; program . remove ( ) ; verify ( m_Manager ) . removeProgram ( eq ( program ) , Mockito . any ( UUID . class ) ) ; program . changeStatus ( ProgramStatus . WAITING_UNINITIALIZED ) ; program . changeStatus ( ProgramStatus . WAITING_INITIALIZED ) ; program . changeStatus ( ProgramStatus . EXECUTING ) ; try { program . remove ( ) ; fail ( "Expecting exception because once a script is initialized the deps are bound to the mission. They" + "need to be released." ) ; } catch ( IllegalStateException e ) { } verify ( m_Manager ) . removeProgram ( eq ( program ) , Mockito . any ( UUID . class ) ) ; }
Test removing the program.
Test removing the program .
//now try with the program in an illegal state //expecting exception //make sure the mission program manager is never called again.