mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/comms/TestCommsMgrImpl.java
@Test
    public void testRemotePhysLinkNameChange()
    {
        // add controller and layer
        m_SUT.getPhysicalsAsync(systemId1);
        Event physicals = mockGetLayersResponse(systemId1, "physical");
        
        m_EventHelperComms.handleEvent(physicals);
        
        List<CommsLayerBaseModel> physicalsLinks = m_SUT.getPhysicalsAsync(systemId1);
        //physical link with uuid3 is changed verify assumption that it is the first layer
        assertThat(physicalsLinks.get(0).getUuid(), is(uuid3));
        String name = physicalsLinks.get(0).getName();
        
        //name change events
        Event nameChange = mockEventNameUpdated(systemId1, "physical");
        
        //handle event
        m_EventHelper.handleEvent(nameChange);

        physicalsLinks = m_SUT.getPhysicalsAsync(systemId1);
        assertThat(physicalsLinks.get(0).getUuid(), is(uuid3));
        assertThat(physicalsLinks.get(0).getName(), is("fizzy"));
        assertThat(name, is(not("fizzy")));
    }
/**
     * Verify proper handling of remote physical link name change event.
     */
Verify proper handling of remote physical link name change event.
Verify proper handling of remote physical link name change event .
@Test
    public void testRemotePhysLinkNameChange()
    {
        m_SUT.getPhysicalsAsync(systemId1);
        Event physicals = mockGetLayersResponse(systemId1, "physical");
        m_EventHelperComms.handleEvent(physicals);
        List<CommsLayerBaseModel> physicalsLinks = m_SUT.getPhysicalsAsync(systemId1);
        assertThat(physicalsLinks.get(0).getUuid(), is(uuid3));
        String name = physicalsLinks.get(0).getName();
        Event nameChange = mockEventNameUpdated(systemId1, "physical");
        m_EventHelper.handleEvent(nameChange);
        physicalsLinks = m_SUT.getPhysicalsAsync(systemId1);
        assertThat(physicalsLinks.get(0).getUuid(), is(uuid3));
        assertThat(physicalsLinks.get(0).getName(), is("fizzy"));
        assertThat(name, is(not("fizzy")));
    }
@ Test public void testRemotePhysLinkNameChange ( ) { m_SUT . getPhysicalsAsync ( systemId1 ) ; Event physicals = mockGetLayersResponse ( systemId1 , "physical" ) ; m_EventHelperComms . handleEvent ( physicals ) ; List < CommsLayerBaseModel > physicalsLinks = m_SUT . getPhysicalsAsync ( systemId1 ) ; assertThat ( physicalsLinks . get ( 0 ) . getUuid ( ) , is ( uuid3 ) ) ; String name = physicalsLinks . get ( 0 ) . getName ( ) ; Event nameChange = mockEventNameUpdated ( systemId1 , "physical" ) ; m_EventHelper . handleEvent ( nameChange ) ; physicalsLinks = m_SUT . getPhysicalsAsync ( systemId1 ) ; assertThat ( physicalsLinks . get ( 0 ) . getUuid ( ) , is ( uuid3 ) ) ; assertThat ( physicalsLinks . get ( 0 ) . getName ( ) , is ( "fizzy" ) ) ; assertThat ( name , is ( not ( "fizzy" ) ) ) ; }
Verify proper handling of remote physical link name change event.
Verify proper handling of remote physical link name change event .
// add controller and layer //physical link with uuid3 is changed verify assumption that it is the first layer //name change events //handle event