mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetDirectoryServiceImpl.java
@Test
    public void testGetAssetByName() throws AssetException
    {
        when(m_Registry.getObjectByName("name")).thenReturn(mock(AssetInternal.class));
        Asset retrievedAsset = m_SUT.getAssetByName("name");
        assertThat(retrievedAsset, notNullValue());
    }
/**
     * Verify requesting as asset by name throws an exception if the name is null.
     * Verify the correct asset is returned if the name is not null.
     */
Verify requesting as asset by name throws an exception if the name is null.
Verify the correct asset is returned if the name is not null.
Verify requesting as asset by name throws an exception if the name is null . Verify the correct asset is returned if the name is not null .
@Test
    public void testGetAssetByName() throws AssetException
    {
        when(m_Registry.getObjectByName("name")).thenReturn(mock(AssetInternal.class));
        Asset retrievedAsset = m_SUT.getAssetByName("name");
        assertThat(retrievedAsset, notNullValue());
    }
@ Test public void testGetAssetByName ( ) throws AssetException { when ( m_Registry . getObjectByName ( "name" ) ) . thenReturn ( mock ( AssetInternal . class ) ) ; Asset retrievedAsset = m_SUT . getAssetByName ( "name" ) ; assertThat ( retrievedAsset , notNullValue ( ) ) ; }
Verify requesting as asset by name throws an exception if the name is null.
Verify requesting as asset by name throws an exception if the name is null .