mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/core/TestPersistedMissionPrograms.java
@Test
    public void testAssetDirectoryService() throws IllegalArgumentException, MissionProgramException, AssetException, 
        InterruptedException, FactoryException, PersistenceFailedException
    {
        Program program = m_MissionProgramManager.getProgram("ads-test");
        assertThat(program, is(notNullValue()));

        // wait for program to execute
        EventHandlerSyncer syncer = 
                new EventHandlerSyncer(Program.TOPIC_PROGRAM_EXECUTED, "(name=ads-test)");
        
        // execute the program, not scheduled to restart at startup
        program.execute();
        
        //wait for execution
        syncer.waitForEvent(10);
        
        assertThat(program.getProgramStatus(), is(ProgramStatus.EXECUTED));
    }
/**
     * Test the asset directory program made in {@link TestMissionProgramManager#testAssetDirectoryService()}
     * function properly after restart.
     * 
     * Asset is created by {@link 
     * mil.dod.th.ose.controller.integration.TestPrepFor2ndRun#createAssetForMissionProgram()}.
     */
Test the asset directory program made in  TestMissionProgramManager#testAssetDirectoryService()
function properly after restart.


Test the asset directory program made in TestMissionProgramManager#testAssetDirectoryService () function properly after restart .
@Test
    public void testAssetDirectoryService() throws IllegalArgumentException, MissionProgramException, AssetException, 
        InterruptedException, FactoryException, PersistenceFailedException
    {
        Program program = m_MissionProgramManager.getProgram("ads-test");
        assertThat(program, is(notNullValue()));
        EventHandlerSyncer syncer = 
                new EventHandlerSyncer(Program.TOPIC_PROGRAM_EXECUTED, "(name=ads-test)");
        program.execute();
        syncer.waitForEvent(10);
        assertThat(program.getProgramStatus(), is(ProgramStatus.EXECUTED));
    }
@ Test public void testAssetDirectoryService ( ) throws IllegalArgumentException , MissionProgramException , AssetException , InterruptedException , FactoryException , PersistenceFailedException { Program program = m_MissionProgramManager . getProgram ( "ads-test" ) ; assertThat ( program , is ( notNullValue ( ) ) ) ; EventHandlerSyncer syncer = new EventHandlerSyncer ( Program . TOPIC_PROGRAM_EXECUTED , "(name=ads-test)" ) ; program . execute ( ) ; syncer . waitForEvent ( 10 ) ; assertThat ( program . getProgramStatus ( ) , is ( ProgramStatus . EXECUTED ) ) ; }
Test the asset directory program made in {@link TestMissionProgramManager#testAssetDirectoryService()}
 function properly after restart.
Test the asset directory program made in { @link TestMissionProgramManager#testAssetDirectoryService () } function properly after restart .
// wait for program to execute // execute the program, not scheduled to restart at startup //wait for execution