mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/persistence/TestObservationQueryImpl.java
@Test
    public void testRemoveDefaultQuery()
    {
        // mock
        when(m_DataStore.removeOnJdoQuery(Mockito.any(Query.class))).thenReturn(32828L);
        
        // replay
        long obsRemoved = m_SUT.remove();
        
        ArgumentCaptor<Query> query = ArgumentCaptor.forClass(Query.class);
        verify(m_DataStore).removeOnJdoQuery(query.capture());
        
        // verify no order
        verify(query.getValue(), never()).setOrdering(anyString());
        // verify no range
        verify(query.getValue(), never()).setRange(anyLong(), anyLong());
        // verify no filter
        verify(query.getValue(), never()).setFilter(anyString());
        
        assertThat(obsRemoved, is(32828L));
    }
/**
     * Verify remove passes JDO query with the default order of descending and no filtering or range is set.
     */
Verify remove passes JDO query with the default order of descending and no filtering or range is set.
Verify remove passes JDO query with the default order of descending and no filtering or range is set .
@Test
    public void testRemoveDefaultQuery()
    {
        when(m_DataStore.removeOnJdoQuery(Mockito.any(Query.class))).thenReturn(32828L);
        long obsRemoved = m_SUT.remove();
        ArgumentCaptor<Query> query = ArgumentCaptor.forClass(Query.class);
        verify(m_DataStore).removeOnJdoQuery(query.capture());
        verify(query.getValue(), never()).setOrdering(anyString());
        verify(query.getValue(), never()).setRange(anyLong(), anyLong());
        verify(query.getValue(), never()).setFilter(anyString());
        assertThat(obsRemoved, is(32828L));
    }
@ Test public void testRemoveDefaultQuery ( ) { when ( m_DataStore . removeOnJdoQuery ( Mockito . any ( Query . class ) ) ) . thenReturn ( 32828L ) ; long obsRemoved = m_SUT . remove ( ) ; ArgumentCaptor < Query > query = ArgumentCaptor . forClass ( Query . class ) ; verify ( m_DataStore ) . removeOnJdoQuery ( query . capture ( ) ) ; verify ( query . getValue ( ) , never ( ) ) . setOrdering ( anyString ( ) ) ; verify ( query . getValue ( ) , never ( ) ) . setRange ( anyLong ( ) , anyLong ( ) ) ; verify ( query . getValue ( ) , never ( ) ) . setFilter ( anyString ( ) ) ; assertThat ( obsRemoved , is ( 32828L ) ) ; }
Verify remove passes JDO query with the default order of descending and no filtering or range is set.
Verify remove passes JDO query with the default order of descending and no filtering or range is set .
// mock // replay // verify no order // verify no range // verify no filter