mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/utils/AssetTestUtils.java
public static void deactivateAsset(final Asset asset, final int timeout)
    {
        //create a syncer that will listen for the deactivated event
        final EventHandlerSyncer deactSyncer = new EventHandlerSyncer(Asset.TOPIC_DEACTIVATION_COMPLETE, 
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, asset.getUuid()));
        
        //deactivate
        asset.deactivateAsync();

        //listen
        deactSyncer.waitForEvent(timeout);

        assertThat(asset.getActiveStatus(), is(Asset.AssetActiveStatus.DEACTIVATED));
    }
/**
     * Deactivate the given asset.
     * @param asset
     *      the asset to deactivate
     * @param timeout
     *      the length of time to wait
     */
Deactivate the given asset.
@param asset
the asset to deactivate
@param timeout
the length of time to wait
Deactivate the given asset . @param asset the asset to deactivate @param timeout the length of time to wait
public static void deactivateAsset(final Asset asset, final int timeout)
    {
        final EventHandlerSyncer deactSyncer = new EventHandlerSyncer(Asset.TOPIC_DEACTIVATION_COMPLETE, 
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, asset.getUuid()));
        asset.deactivateAsync();
        deactSyncer.waitForEvent(timeout);
        assertThat(asset.getActiveStatus(), is(Asset.AssetActiveStatus.DEACTIVATED));
    }
public static void deactivateAsset ( final Asset asset , final int timeout ) { final EventHandlerSyncer deactSyncer = new EventHandlerSyncer ( Asset . TOPIC_DEACTIVATION_COMPLETE , String . format ( "(%s=%s)" , FactoryDescriptor . EVENT_PROP_OBJ_UUID , asset . getUuid ( ) ) ) ; asset . deactivateAsync ( ) ; deactSyncer . waitForEvent ( timeout ) ; assertThat ( asset . getActiveStatus ( ) , is ( Asset . AssetActiveStatus . DEACTIVATED ) ) ; }
Deactivate the given asset.
Deactivate the given asset .
//create a syncer that will listen for the deactivated event //deactivate //listen