mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testProgramStatusChangeIllegalState() throws MissionProgramException
    {
        ProgramImpl program = createProgram("name");
        
        //this would take place in the mission program manager's script initialization process if initialization fails
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);

        try
        {
            program.changeStatus(ProgramStatus.UNSATISFIED);
            fail("Expecting exception because the script should not go from initialized to unsatisfied.");
        }
        catch (IllegalStateException e)
        {
            //expected exception, because the script was satisfied to get initialized, going back to unsatisfied
            //would mean that the system lost on the dependencies.
        }
    }
/**
     * Test that if the mission is in a waiting initialized state that an error is thrown if the 
     * status tries to change to unsatisfied.
     */
Test that if the mission is in a waiting initialized state that an error is thrown if the
status tries to change to unsatisfied.
Test that if the mission is in a waiting initialized state that an error is thrown if the status tries to change to unsatisfied .
@Test
    public void testProgramStatusChangeIllegalState() throws MissionProgramException
    {
        ProgramImpl program = createProgram("name");
        program.changeStatus(ProgramStatus.WAITING_INITIALIZED);
        try
        {
            program.changeStatus(ProgramStatus.UNSATISFIED);
            fail("Expecting exception because the script should not go from initialized to unsatisfied.");
        }
        catch (IllegalStateException e)
        {
        }
    }
@ Test public void testProgramStatusChangeIllegalState ( ) throws MissionProgramException { ProgramImpl program = createProgram ( "name" ) ; program . changeStatus ( ProgramStatus . WAITING_INITIALIZED ) ; try { program . changeStatus ( ProgramStatus . UNSATISFIED ) ; fail ( "Expecting exception because the script should not go from initialized to unsatisfied." ) ; } catch ( IllegalStateException e ) { } }
Test that if the mission is in a waiting initialized state that an error is thrown if the
 status tries to change to unsatisfied.
Test that if the mission is in a waiting initialized state that an error is thrown if the status tries to change to unsatisfied .
//this would take place in the mission program manager's script initialization process if initialization fails //expected exception, because the script was satisfied to get initialized, going back to unsatisfied //would mean that the system lost on the dependencies.