mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetImpl.java
@Test
    public void testDelete_Activated() throws Exception
    {
        m_SUT.activateAsync();

        try
        {
            m_SUT.delete();
            fail("Should fail to remove as asset is activated");
        }
        catch (IllegalStateException e)
        {

        }
        verify(m_FactoryRegistry, never()).delete(Mockito.any(FactoryObjectInternal.class));
        verify(m_PowerInternal, never()).deleteWakeLock(m_WakeLock);
    }
/**
     * Verify the registry is not called if asset is active.
     */
Verify the registry is not called if asset is active.
Verify the registry is not called if asset is active .
@Test
    public void testDelete_Activated() throws Exception
    {
        m_SUT.activateAsync();
        try
        {
            m_SUT.delete();
            fail("Should fail to remove as asset is activated");
        }
        catch (IllegalStateException e)
        {
        }
        verify(m_FactoryRegistry, never()).delete(Mockito.any(FactoryObjectInternal.class));
        verify(m_PowerInternal, never()).deleteWakeLock(m_WakeLock);
    }
@ Test public void testDelete_Activated ( ) throws Exception { m_SUT . activateAsync ( ) ; try { m_SUT . delete ( ) ; fail ( "Should fail to remove as asset is activated" ) ; } catch ( IllegalStateException e ) { } verify ( m_FactoryRegistry , never ( ) ) . delete ( Mockito . any ( FactoryObjectInternal . class ) ) ; verify ( m_PowerInternal , never ( ) ) . deleteWakeLock ( m_WakeLock ) ; }
Verify the registry is not called if asset is active.
Verify the registry is not called if asset is active .