mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/persistence/TestObservationStoreImpl.java
@Test
    public final void testRemoveByAssetUuid()
    {
        // mock
        UUID assetUuid = UUID.randomUUID();
        Query jdoQuery = mock(Query.class);
        when(m_PersistenceManager.newQuery(m_Extent)).thenReturn(jdoQuery);
        when(jdoQuery.deletePersistentAll()).thenReturn(3827L);
        
        Long obsRemoved = m_SUT.removeByAssetUuid(assetUuid);
        
        verify(jdoQuery).setFilter(String.format(ASSET_UUID_FILTER, assetUuid));
        verify(jdoQuery).deletePersistentAll();
        assertThat(obsRemoved, is(3827L));
        verify(m_WakeLock, times(5)).activate();
        verify(m_WakeLock, times(5)).cancel();
    }
/**
     * Verify removing by asset UUID sets correct filter.
     */
Verify removing by asset UUID sets correct filter.
Verify removing by asset UUID sets correct filter .
@Test
    public final void testRemoveByAssetUuid()
    {
        UUID assetUuid = UUID.randomUUID();
        Query jdoQuery = mock(Query.class);
        when(m_PersistenceManager.newQuery(m_Extent)).thenReturn(jdoQuery);
        when(jdoQuery.deletePersistentAll()).thenReturn(3827L);
        Long obsRemoved = m_SUT.removeByAssetUuid(assetUuid);
        verify(jdoQuery).setFilter(String.format(ASSET_UUID_FILTER, assetUuid));
        verify(jdoQuery).deletePersistentAll();
        assertThat(obsRemoved, is(3827L));
        verify(m_WakeLock, times(5)).activate();
        verify(m_WakeLock, times(5)).cancel();
    }
@ Test public final void testRemoveByAssetUuid ( ) { UUID assetUuid = UUID . randomUUID ( ) ; Query jdoQuery = mock ( Query . class ) ; when ( m_PersistenceManager . newQuery ( m_Extent ) ) . thenReturn ( jdoQuery ) ; when ( jdoQuery . deletePersistentAll ( ) ) . thenReturn ( 3827L ) ; Long obsRemoved = m_SUT . removeByAssetUuid ( assetUuid ) ; verify ( jdoQuery ) . setFilter ( String . format ( ASSET_UUID_FILTER , assetUuid ) ) ; verify ( jdoQuery ) . deletePersistentAll ( ) ; assertThat ( obsRemoved , is ( 3827L ) ) ; verify ( m_WakeLock , times ( 5 ) ) . activate ( ) ; verify ( m_WakeLock , times ( 5 ) ) . cancel ( ) ; }
Verify removing by asset UUID sets correct filter.
Verify removing by asset UUID sets correct filter .
// mock