mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/data/TestBaseFactoryObjectDataManager.java
@Test
    public void testGetAllObjectData()
    {
        //is it worth while to test the PersistentDataStore's query method for our 
        //specific context and description?
    
        FactoryDescriptor factory = FactoryMocker.mockFactoryDescriptor(PRODUCT_TYPE);
        
        //create a mock collection
        PersistentData persistentData1 = createPersistentData(UUID.randomUUID(), new byte[]{1,2,3,4,5,6});
        PersistentData persistentData2 = createPersistentData(UUID.randomUUID(), new byte[]{1,2,3,4,5,6});
        PersistentData persistentData3 = createPersistentData(UUID.randomUUID(), new byte[]{1,2,3,4,5,6});
        
        Collection<PersistentData> factoryCollection = new ArrayList<PersistentData>();
        factoryCollection.add(persistentData1);
        factoryCollection.add(persistentData2);
        factoryCollection.add(persistentData3);
    
        when(m_PersistentDataStore.query(LinkLayer.class, PRODUCT_TYPE)).thenReturn(factoryCollection);
    
        //run get all object data
        Collection<PersistentData> retrievedCollection = m_SUT.getAllObjectData(factory);
        
        assertThat(retrievedCollection, is(factoryCollection));
    }
/**
     * Verify the expected behavior of getAllObjectData in a default circumstance
     * - all objects associated with a given factory should be returned
     */
Verify the expected behavior of getAllObjectData in a default circumstance
- all objects associated with a given factory should be returned
Verify the expected behavior of getAllObjectData in a default circumstance - all objects associated with a given factory should be returned
@Test
    public void testGetAllObjectData()
    {
        FactoryDescriptor factory = FactoryMocker.mockFactoryDescriptor(PRODUCT_TYPE);
        PersistentData persistentData1 = createPersistentData(UUID.randomUUID(), new byte[]{1,2,3,4,5,6});
        PersistentData persistentData2 = createPersistentData(UUID.randomUUID(), new byte[]{1,2,3,4,5,6});
        PersistentData persistentData3 = createPersistentData(UUID.randomUUID(), new byte[]{1,2,3,4,5,6});
        Collection<PersistentData> factoryCollection = new ArrayList<PersistentData>();
        factoryCollection.add(persistentData1);
        factoryCollection.add(persistentData2);
        factoryCollection.add(persistentData3);
        when(m_PersistentDataStore.query(LinkLayer.class, PRODUCT_TYPE)).thenReturn(factoryCollection);
        Collection<PersistentData> retrievedCollection = m_SUT.getAllObjectData(factory);
        assertThat(retrievedCollection, is(factoryCollection));
    }
@ Test public void testGetAllObjectData ( ) { FactoryDescriptor factory = FactoryMocker . mockFactoryDescriptor ( PRODUCT_TYPE ) ; PersistentData persistentData1 = createPersistentData ( UUID . randomUUID ( ) , new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ) ; PersistentData persistentData2 = createPersistentData ( UUID . randomUUID ( ) , new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ) ; PersistentData persistentData3 = createPersistentData ( UUID . randomUUID ( ) , new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ) ; Collection < PersistentData > factoryCollection = new ArrayList < PersistentData > ( ) ; factoryCollection . add ( persistentData1 ) ; factoryCollection . add ( persistentData2 ) ; factoryCollection . add ( persistentData3 ) ; when ( m_PersistentDataStore . query ( LinkLayer . class , PRODUCT_TYPE ) ) . thenReturn ( factoryCollection ) ; Collection < PersistentData > retrievedCollection = m_SUT . getAllObjectData ( factory ) ; assertThat ( retrievedCollection , is ( factoryCollection ) ) ; }
Verify the expected behavior of getAllObjectData in a default circumstance
 - all objects associated with a given factory should be returned
Verify the expected behavior of getAllObjectData in a default circumstance - all objects associated with a given factory should be returned
//is it worth while to test the PersistentDataStore's query method for our  //specific context and description? //create a mock collection //run get all object data