mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetDirectoryServiceImpl.java
@SuppressWarnings({"unchecked"})
    @Test
    public void testCreateAsset() throws AssetException, FactoryException, 
        IllegalArgumentException, FactoryObjectInformationException, ClassNotFoundException
    {
        AssetInternal mockAsset = mock(AssetInternal.class);
        when(m_Registry.createNewObject(eq(m_AssetFactory), Mockito.any(String.class), 
                Mockito.any(Map.class))).thenReturn(mockAsset);
        
        Asset asset = m_SUT.createAsset(PRODUCT_TYPE);
        assertThat(asset, is(notNullValue()));
        
        verify(m_Registry).createNewObject(m_AssetFactory, null, new Hashtable<String, Object>());
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
    }
/**
     * Test that asset is created and dictionary passed in is correct.
     */
Test that asset is created and dictionary passed in is correct.
Test that asset is created and dictionary passed in is correct .
@SuppressWarnings({"unchecked"})
    @Test
    public void testCreateAsset() throws AssetException, FactoryException, 
        IllegalArgumentException, FactoryObjectInformationException, ClassNotFoundException
    {
        AssetInternal mockAsset = mock(AssetInternal.class);
        when(m_Registry.createNewObject(eq(m_AssetFactory), Mockito.any(String.class), 
                Mockito.any(Map.class))).thenReturn(mockAsset);
        Asset asset = m_SUT.createAsset(PRODUCT_TYPE);
        assertThat(asset, is(notNullValue()));
        verify(m_Registry).createNewObject(m_AssetFactory, null, new Hashtable<String, Object>());
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
    }
@ SuppressWarnings ( { "unchecked" } ) @ Test public void testCreateAsset ( ) throws AssetException , FactoryException , IllegalArgumentException , FactoryObjectInformationException , ClassNotFoundException { AssetInternal mockAsset = mock ( AssetInternal . class ) ; when ( m_Registry . createNewObject ( eq ( m_AssetFactory ) , Mockito . any ( String . class ) , Mockito . any ( Map . class ) ) ) . thenReturn ( mockAsset ) ; Asset asset = m_SUT . createAsset ( PRODUCT_TYPE ) ; assertThat ( asset , is ( notNullValue ( ) ) ) ; verify ( m_Registry ) . createNewObject ( m_AssetFactory , null , new Hashtable < String , Object > ( ) ) ; verify ( m_WakeLock ) . activate ( ) ; verify ( m_WakeLock ) . cancel ( ) ; }
Test that asset is created and dictionary passed in is correct.
Test that asset is created and dictionary passed in is correct .