mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/data/TestBaseFactoryObjectDataManager.java
@Test
    public void testTryRemove_HandleException() throws FactoryObjectInformationException, IllegalArgumentException, 
        PersistenceFailedException, InvalidProtocolBufferException
    {
        UUID uuid = UUID.randomUUID();
        
        doThrow(new IllegalArgumentException()).when(m_PersistentDataStore).remove(uuid);
        
        // just make sure no exception is thrown
        m_SUT.tryRemove(uuid);
    }
/**
     * Verify that when tryRemove is called and data store throws exception it is caught.
     */
Verify that when tryRemove is called and data store throws exception it is caught.
Verify that when tryRemove is called and data store throws exception it is caught .
@Test
    public void testTryRemove_HandleException() throws FactoryObjectInformationException, IllegalArgumentException, 
        PersistenceFailedException, InvalidProtocolBufferException
    {
        UUID uuid = UUID.randomUUID();
        doThrow(new IllegalArgumentException()).when(m_PersistentDataStore).remove(uuid);
        m_SUT.tryRemove(uuid);
    }
@ Test public void testTryRemove_HandleException ( ) throws FactoryObjectInformationException , IllegalArgumentException , PersistenceFailedException , InvalidProtocolBufferException { UUID uuid = UUID . randomUUID ( ) ; doThrow ( new IllegalArgumentException ( ) ) . when ( m_PersistentDataStore ) . remove ( uuid ) ; m_SUT . tryRemove ( uuid ) ; }
Verify that when tryRemove is called and data store throws exception it is caught.
Verify that when tryRemove is called and data store throws exception it is caught .
// just make sure no exception is thrown