mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetDirectoryServiceImpl.java
@Test
    public void testGetAssetsByType() throws IllegalArgumentException, 
        AssetException, FactoryException, FactoryObjectInformationException
    {
        Set<AssetInternal> set = new HashSet<AssetInternal>();
        set.add(mock(AssetInternal.class));
        when(m_Registry.getObjectsByProductType(PRODUCT_TYPE)).thenReturn(set);
        
        Set<? extends Asset> assetSet = m_SUT.getAssetsByType(PRODUCT_TYPE);
        assertThat(assetSet.size(), is(1));
    }
/**
     * Verify the correct assets are returned when a request to get assets by type is made.
     */
Verify the correct assets are returned when a request to get assets by type is made.
Verify the correct assets are returned when a request to get assets by type is made .
@Test
    public void testGetAssetsByType() throws IllegalArgumentException, 
        AssetException, FactoryException, FactoryObjectInformationException
    {
        Set<AssetInternal> set = new HashSet<AssetInternal>();
        set.add(mock(AssetInternal.class));
        when(m_Registry.getObjectsByProductType(PRODUCT_TYPE)).thenReturn(set);
        Set<? extends Asset> assetSet = m_SUT.getAssetsByType(PRODUCT_TYPE);
        assertThat(assetSet.size(), is(1));
    }
@ Test public void testGetAssetsByType ( ) throws IllegalArgumentException , AssetException , FactoryException , FactoryObjectInformationException { Set < AssetInternal > set = new HashSet < AssetInternal > ( ) ; set . add ( mock ( AssetInternal . class ) ) ; when ( m_Registry . getObjectsByProductType ( PRODUCT_TYPE ) ) . thenReturn ( set ) ; Set < ? extends Asset > assetSet = m_SUT . getAssetsByType ( PRODUCT_TYPE ) ; assertThat ( assetSet . size ( ) , is ( 1 ) ) ; }
Verify the correct assets are returned when a request to get assets by type is made.
Verify the correct assets are returned when a request to get assets by type is made .