mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetDirectoryServiceImpl.java
@Test
    public void testGetAssetByUuid() throws AssetException, 
        IllegalArgumentException, FactoryException, FactoryObjectInformationException
    {
        UUID uuid = UUID.randomUUID();
        AssetInternal internal = mock(AssetInternal.class);
        when(m_Registry.getObjectByUuid(uuid)).thenReturn(internal);
        Asset retrievedAsset = m_SUT.getAssetByUuid(uuid);
        assertThat(retrievedAsset, notNullValue());
    }
/**
     * Verify requesting as asset by UUID throws an exception if the UUID is null.
     * Verify the correct asset is returned if the UUID is not null.
     */
Verify requesting as asset by UUID throws an exception if the UUID is null.
Verify the correct asset is returned if the UUID is not null.
Verify requesting as asset by UUID throws an exception if the UUID is null . Verify the correct asset is returned if the UUID is not null .
@Test
    public void testGetAssetByUuid() throws AssetException, 
        IllegalArgumentException, FactoryException, FactoryObjectInformationException
    {
        UUID uuid = UUID.randomUUID();
        AssetInternal internal = mock(AssetInternal.class);
        when(m_Registry.getObjectByUuid(uuid)).thenReturn(internal);
        Asset retrievedAsset = m_SUT.getAssetByUuid(uuid);
        assertThat(retrievedAsset, notNullValue());
    }
@ Test public void testGetAssetByUuid ( ) throws AssetException , IllegalArgumentException , FactoryException , FactoryObjectInformationException { UUID uuid = UUID . randomUUID ( ) ; AssetInternal internal = mock ( AssetInternal . class ) ; when ( m_Registry . getObjectByUuid ( uuid ) ) . thenReturn ( internal ) ; Asset retrievedAsset = m_SUT . getAssetByUuid ( uuid ) ; assertThat ( retrievedAsset , notNullValue ( ) ) ; }
Verify requesting as asset by UUID throws an exception if the UUID is null.
Verify requesting as asset by UUID throws an exception if the UUID is null .