mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestLinkLayerNamespace.java
@After
    public void tearDown() throws IOException, InterruptedException
    {
        try
        {
            // ---Remove link layer---
            RemoteLinkLayerUtils.removeLink(linkUuid, socket);

            // ---Remove physical link---
            RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid, socket);
            
            // verify physical link and link layer are gone
            List<SharedMessages.UUID> uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket,
                    CommType.PhysicalLink);
            assertThat(uuidList.contains(pLinkUuid), is(false));

            uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.Linklayer);
            assertThat(uuidList.contains(linkUuid), is(false));
            MessageListener.unregisterEvent(socket);           
        }
        finally
        {
            socket.close();
        }
    }
/**
     * Remove the physical link, and link layer created in setup, verify they are removed.
     */
Remove the physical link, and link layer created in setup, verify they are removed.
Remove the physical link and link layer created in setup verify they are removed .
@After
    public void tearDown() throws IOException, InterruptedException
    {
        try
        {
            RemoteLinkLayerUtils.removeLink(linkUuid, socket);
            RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid, socket);
            List<SharedMessages.UUID> uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket,
                    CommType.PhysicalLink);
            assertThat(uuidList.contains(pLinkUuid), is(false));
            uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.Linklayer);
            assertThat(uuidList.contains(linkUuid), is(false));
            MessageListener.unregisterEvent(socket);           
        }
        finally
        {
            socket.close();
        }
    }
@ After public void tearDown ( ) throws IOException , InterruptedException { try { RemoteLinkLayerUtils . removeLink ( linkUuid , socket ) ; RemotePhysicalLinkUtils . tryRemovePhysicalLink ( pLinkUuid , socket ) ; List < SharedMessages . UUID > uuidList = CustomCommsNamespaceUtils . getLayerUuidsByType ( socket , CommType . PhysicalLink ) ; assertThat ( uuidList . contains ( pLinkUuid ) , is ( false ) ) ; uuidList = CustomCommsNamespaceUtils . getLayerUuidsByType ( socket , CommType . Linklayer ) ; assertThat ( uuidList . contains ( linkUuid ) , is ( false ) ) ; MessageListener . unregisterEvent ( socket ) ; } finally { socket . close ( ) ; } }
Remove the physical link, and link layer created in setup, verify they are removed.
Remove the physical link and link layer created in setup verify they are removed .
// ---Remove link layer--- // ---Remove physical link--- // verify physical link and link layer are gone