mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestProgramImpl.java
@Test
    public void testGetVariableMetaDataWithReset()
    {
        //set up mission program
        MissionProgramSchedule schedule = new MissionProgramSchedule().withIndefiniteInterval(false);
        MissionProgramTemplate program = new MissionProgramTemplate();
        program.setName("TestMission");
        program.setDescription("A test mission that tests the usage of metadata");
        program.setSource("TheSourceIsHere");
        program.withVariableMetaData(new MissionVariableMetaData().withName("Var"). 
            withType(MissionVariableTypesEnum.PROGRAM_DEPENDENCIES).withDescription("Really awesome variable").
            withDefaultValue("Steve").withOptionValues("Super", "Bat", "Yeti"));
        program.withVariableMetaData(new MissionVariableMetaData().withName("Var"). 
            withType(MissionVariableTypesEnum.ASSET).withDescription("Really awesome variable"));
        ProgramImpl programTest =  new ProgramImpl(m_Manager, m_EventAdmin, program, new MissionProgramParameters().
            withSchedule(schedule), UUID.randomUUID());

        //get all metadata set for the program
        List<MissionVariableMetaData> lister = programTest.getVariableMetaData();
        //reset name to barbie
        lister.get(0).setName("barbie");
        try
        {
            //Unable to add new items to the metadata list
            lister.add(new MissionVariableMetaData().withName("@").withType(MissionVariableTypesEnum.STRING).
                withDescription("@ is really just a character!"));
            fail("Expected Excetpion");
        }
        catch (UnsupportedOperationException e)
        {

        }
        //verify that this setting of the name had no effect on the actual mission program data.
        List<MissionVariableMetaData> lister2 = programTest.getVariableMetaData();
        assertThat(lister2.get(0).getName(), is("Var"));
    }
/*
     * Tests that although a list is returned when the method getVariableMetadata is called, that any changes to the
     * returned list do not actually change the values within the template. 
     */
Tests that although a list is returned when the method getVariableMetadata is called, that any changes to the
returned list do not actually change the values within the template.
Tests that although a list is returned when the method getVariableMetadata is called that any changes to the returned list do not actually change the values within the template .
@Test
    public void testGetVariableMetaDataWithReset()
    {
        MissionProgramSchedule schedule = new MissionProgramSchedule().withIndefiniteInterval(false);
        MissionProgramTemplate program = new MissionProgramTemplate();
        program.setName("TestMission");
        program.setDescription("A test mission that tests the usage of metadata");
        program.setSource("TheSourceIsHere");
        program.withVariableMetaData(new MissionVariableMetaData().withName("Var"). 
            withType(MissionVariableTypesEnum.PROGRAM_DEPENDENCIES).withDescription("Really awesome variable").
            withDefaultValue("Steve").withOptionValues("Super", "Bat", "Yeti"));
        program.withVariableMetaData(new MissionVariableMetaData().withName("Var"). 
            withType(MissionVariableTypesEnum.ASSET).withDescription("Really awesome variable"));
        ProgramImpl programTest =  new ProgramImpl(m_Manager, m_EventAdmin, program, new MissionProgramParameters().
            withSchedule(schedule), UUID.randomUUID());
        List<MissionVariableMetaData> lister = programTest.getVariableMetaData();
        lister.get(0).setName("barbie");
        try
        {
            lister.add(new MissionVariableMetaData().withName("@").withType(MissionVariableTypesEnum.STRING).
                withDescription("@ is really just a character!"));
            fail("Expected Excetpion");
        }
        catch (UnsupportedOperationException e)
        {
        }
        List<MissionVariableMetaData> lister2 = programTest.getVariableMetaData();
        assertThat(lister2.get(0).getName(), is("Var"));
    }
@ Test public void testGetVariableMetaDataWithReset ( ) { MissionProgramSchedule schedule = new MissionProgramSchedule ( ) . withIndefiniteInterval ( false ) ; MissionProgramTemplate program = new MissionProgramTemplate ( ) ; program . setName ( "TestMission" ) ; program . setDescription ( "A test mission that tests the usage of metadata" ) ; program . setSource ( "TheSourceIsHere" ) ; program . withVariableMetaData ( new MissionVariableMetaData ( ) . withName ( "Var" ) . withType ( MissionVariableTypesEnum . PROGRAM_DEPENDENCIES ) . withDescription ( "Really awesome variable" ) . withDefaultValue ( "Steve" ) . withOptionValues ( "Super" , "Bat" , "Yeti" ) ) ; program . withVariableMetaData ( new MissionVariableMetaData ( ) . withName ( "Var" ) . withType ( MissionVariableTypesEnum . ASSET ) . withDescription ( "Really awesome variable" ) ) ; ProgramImpl programTest = new ProgramImpl ( m_Manager , m_EventAdmin , program , new MissionProgramParameters ( ) . withSchedule ( schedule ) , UUID . randomUUID ( ) ) ; List < MissionVariableMetaData > lister = programTest . getVariableMetaData ( ) ; lister . get ( 0 ) . setName ( "barbie" ) ; try { lister . add ( new MissionVariableMetaData ( ) . withName ( "@" ) . withType ( MissionVariableTypesEnum . STRING ) . withDescription ( "@ is really just a character!" ) ) ; fail ( "Expected Excetpion" ) ; } catch ( UnsupportedOperationException e ) { } List < MissionVariableMetaData > lister2 = programTest . getVariableMetaData ( ) ; assertThat ( lister2 . get ( 0 ) . getName ( ) , is ( "Var" ) ) ; }
Tests that although a list is returned when the method getVariableMetadata is called, that any changes to the
 returned list do not actually change the values within the template.
Tests that although a list is returned when the method getVariableMetadata is called that any changes to the returned list do not actually change the values within the template .
//set up mission program //get all metadata set for the program //reset name to barbie //Unable to add new items to the metadata list //verify that this setting of the name had no effect on the actual mission program data.