mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetPageDisplayHelperImpl.java
@Test
    public void testGetAssetCommandIndex()
    {
        UUID uuid = UUID.randomUUID();
        UUID uuid2 = UUID.randomUUID();
        
        //test new controller and new uuid
        ActiveCommandIndexHolder commandIndex = m_SUT.getAssetCommandIndexHolder(123, uuid);
        assertThat(commandIndex.getActiveCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandTab().getIndex(), is(0));
        
        //test same controller, new uuid
        commandIndex = m_SUT.getAssetCommandIndexHolder(123, uuid2);
        assertThat(commandIndex.getActiveCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandTab().getIndex(), is(0));
        commandIndex.getActiveCommandPanel().setIndex(3); //reset index of object
        
        //test same controller, same uuid - verify returned object maintains set value
        commandIndex = m_SUT.getAssetCommandIndexHolder(123, uuid2);
        assertThat(commandIndex.getActiveCommandPanel().getIndex(), is(3));
    }
/**
     * Verify new command index is added to the map.
     * Verify command index is updated if there's a new uuid.
     * Verify command index can be retrieved successfully. 
     */
Verify new command index is added to the map.
Verify command index is updated if there's a new uuid.
Verify command index can be retrieved successfully.
Verify new command index is added to the map . Verify command index is updated if there ' s a new uuid . Verify command index can be retrieved successfully .
@Test
    public void testGetAssetCommandIndex()
    {
        UUID uuid = UUID.randomUUID();
        UUID uuid2 = UUID.randomUUID();
        ActiveCommandIndexHolder commandIndex = m_SUT.getAssetCommandIndexHolder(123, uuid);
        assertThat(commandIndex.getActiveCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandTab().getIndex(), is(0));
        commandIndex = m_SUT.getAssetCommandIndexHolder(123, uuid2);
        assertThat(commandIndex.getActiveCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandPanel().getIndex(), is(-1));
        assertThat(commandIndex.getActiveGetCommandTab().getIndex(), is(0));
        commandIndex.getActiveCommandPanel().setIndex(3); 
        commandIndex = m_SUT.getAssetCommandIndexHolder(123, uuid2);
        assertThat(commandIndex.getActiveCommandPanel().getIndex(), is(3));
    }
@ Test public void testGetAssetCommandIndex ( ) { UUID uuid = UUID . randomUUID ( ) ; UUID uuid2 = UUID . randomUUID ( ) ; ActiveCommandIndexHolder commandIndex = m_SUT . getAssetCommandIndexHolder ( 123 , uuid ) ; assertThat ( commandIndex . getActiveCommandPanel ( ) . getIndex ( ) , is ( - 1 ) ) ; assertThat ( commandIndex . getActiveGetCommandPanel ( ) . getIndex ( ) , is ( - 1 ) ) ; assertThat ( commandIndex . getActiveGetCommandTab ( ) . getIndex ( ) , is ( 0 ) ) ; commandIndex = m_SUT . getAssetCommandIndexHolder ( 123 , uuid2 ) ; assertThat ( commandIndex . getActiveCommandPanel ( ) . getIndex ( ) , is ( - 1 ) ) ; assertThat ( commandIndex . getActiveGetCommandPanel ( ) . getIndex ( ) , is ( - 1 ) ) ; assertThat ( commandIndex . getActiveGetCommandTab ( ) . getIndex ( ) , is ( 0 ) ) ; commandIndex . getActiveCommandPanel ( ) . setIndex ( 3 ) ; commandIndex = m_SUT . getAssetCommandIndexHolder ( 123 , uuid2 ) ; assertThat ( commandIndex . getActiveCommandPanel ( ) . getIndex ( ) , is ( 3 ) ) ; }
Verify new command index is added to the map.
Verify new command index is added to the map .
//test new controller and new uuid //test same controller, new uuid //reset index of object //test same controller, same uuid - verify returned object maintains set value