mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testTestExecuteUnsupportedOperation() throws MissionProgramException
    {
        //mission information
        MissionProgramSchedule schedule = new MissionProgramSchedule().withIndefiniteInterval(false).withActive(true);
        MissionProgramTemplate programMission = new MissionProgramTemplate().withVendor("hello").
            withSupportTestExecution(false);
        programMission.setName("test");
        programMission.setSource("TheSourceIsHere");
        programMission.setPrimaryImage(new DigitalMedia().withEncoding("Hieroglyphics"));
        ProgramImpl program = new ProgramImpl(m_Manager, m_EventAdmin, programMission, new MissionProgramParameters().
             withSchedule(schedule).withProgramName("test"), UUID.randomUUID());

        //try to execute the test function
        try
        {
            program.executeTest();
            fail("Expecting exception because the programs does not support a test");
        }
        catch (UnsupportedOperationException ex)
        {
            //expected failure
        }
    }
/**
     * Test that the program will not attempt to be test executed if the operation is not signified as supported within
     * the template XSD.
     * 
     * Verify unsupported operation is thrown.
     */
Test that the program will not attempt to be test executed if the operation is not signified as supported within
the template XSD.

Verify unsupported operation is thrown.
Test that the program will not attempt to be test executed if the operation is not signified as supported within the template XSD . Verify unsupported operation is thrown .
@Test
    public void testTestExecuteUnsupportedOperation() throws MissionProgramException
    {
        MissionProgramSchedule schedule = new MissionProgramSchedule().withIndefiniteInterval(false).withActive(true);
        MissionProgramTemplate programMission = new MissionProgramTemplate().withVendor("hello").
            withSupportTestExecution(false);
        programMission.setName("test");
        programMission.setSource("TheSourceIsHere");
        programMission.setPrimaryImage(new DigitalMedia().withEncoding("Hieroglyphics"));
        ProgramImpl program = new ProgramImpl(m_Manager, m_EventAdmin, programMission, new MissionProgramParameters().
             withSchedule(schedule).withProgramName("test"), UUID.randomUUID());
        try
        {
            program.executeTest();
            fail("Expecting exception because the programs does not support a test");
        }
        catch (UnsupportedOperationException ex)
        {
        }
    }
@ Test public void testTestExecuteUnsupportedOperation ( ) throws MissionProgramException { MissionProgramSchedule schedule = new MissionProgramSchedule ( ) . withIndefiniteInterval ( false ) . withActive ( true ) ; MissionProgramTemplate programMission = new MissionProgramTemplate ( ) . withVendor ( "hello" ) . withSupportTestExecution ( false ) ; programMission . setName ( "test" ) ; programMission . setSource ( "TheSourceIsHere" ) ; programMission . setPrimaryImage ( new DigitalMedia ( ) . withEncoding ( "Hieroglyphics" ) ) ; ProgramImpl program = new ProgramImpl ( m_Manager , m_EventAdmin , programMission , new MissionProgramParameters ( ) . withSchedule ( schedule ) . withProgramName ( "test" ) , UUID . randomUUID ( ) ) ; try { program . executeTest ( ) ; fail ( "Expecting exception because the programs does not support a test" ) ; } catch ( UnsupportedOperationException ex ) { } }
Test that the program will not attempt to be test executed if the operation is not signified as supported within
 the template XSD.
Test that the program will not attempt to be test executed if the operation is not signified as supported within the template XSD .
//mission information //try to execute the test function //expected failure