mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/transport/TestTransportLayerImpl.java
@Test
    public void testEndReceivingExceptionNullPacket()
    {
        initTransportLayer(false);

        Address sourceAddress = mock(Address.class);
        Address destAddress = mock(Address.class);
        try
        {
            m_SUT.beginReceiving();
            verify(m_WakeLock).activate();
            m_SUT.endReceiving(null, sourceAddress, destAddress);
            fail("expecting exception");
        }
        catch (NullPointerException e)
        {
            verify(m_WakeLock, never()).cancel();
        }
    }
/**
     * Verify if the packet is null that an exception is thrown.
     */
Verify if the packet is null that an exception is thrown.
Verify if the packet is null that an exception is thrown .
@Test
    public void testEndReceivingExceptionNullPacket()
    {
        initTransportLayer(false);
        Address sourceAddress = mock(Address.class);
        Address destAddress = mock(Address.class);
        try
        {
            m_SUT.beginReceiving();
            verify(m_WakeLock).activate();
            m_SUT.endReceiving(null, sourceAddress, destAddress);
            fail("expecting exception");
        }
        catch (NullPointerException e)
        {
            verify(m_WakeLock, never()).cancel();
        }
    }
@ Test public void testEndReceivingExceptionNullPacket ( ) { initTransportLayer ( false ) ; Address sourceAddress = mock ( Address . class ) ; Address destAddress = mock ( Address . class ) ; try { m_SUT . beginReceiving ( ) ; verify ( m_WakeLock ) . activate ( ) ; m_SUT . endReceiving ( null , sourceAddress , destAddress ) ; fail ( "expecting exception" ) ; } catch ( NullPointerException e ) { verify ( m_WakeLock , never ( ) ) . cancel ( ) ; } }
Verify if the packet is null that an exception is thrown.
Verify if the packet is null that an exception is thrown .