mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/data/TestBaseFactoryObjectDataManager.java
@Test
    public void testGetPersistentUuidNameNotFound()
    {
        //create UUIDs for stored data
        UUID uuid1 = UUID.randomUUID();
        UUID uuid2 = UUID.randomUUID();
     
        //create data entries
        FactoryObjectData factData1 = createFactoryObjectData("bob", null);
        FactoryObjectData factData2 = createFactoryObjectData("jack", null);
        
        //create Persistent Data
        PersistentData pdata1 = createPersistentData(uuid1, factData1.toByteArray());
        PersistentData pdata2 = createPersistentData(uuid2, factData2.toByteArray());
        
        List<PersistentData> persistentDatas = new ArrayList<PersistentData>();
        persistentDatas.add(pdata1);
        persistentDatas.add(pdata2);
        
        //mock out the query to search
        when(m_PersistentDataStore.query(eq(LinkLayer.class))).thenReturn(persistentDatas);
        
        //find entity
        UUID foundUUID = m_SUT.getPersistentUuid("noone");
        
        //verify that name was not found in the data store
        assertThat(foundUUID, is(nullValue()));  
    }
/**
     * Verify the behavior of getPersistentUuid if the given name is not in the data store
     * - the return value should be null if the name is not found.
     */
Verify the behavior of getPersistentUuid if the given name is not in the data store
- the return value should be null if the name is not found.
Verify the behavior of getPersistentUuid if the given name is not in the data store - the return value should be null if the name is not found .
@Test
    public void testGetPersistentUuidNameNotFound()
    {
        UUID uuid1 = UUID.randomUUID();
        UUID uuid2 = UUID.randomUUID();
        FactoryObjectData factData1 = createFactoryObjectData("bob", null);
        FactoryObjectData factData2 = createFactoryObjectData("jack", null);
        PersistentData pdata1 = createPersistentData(uuid1, factData1.toByteArray());
        PersistentData pdata2 = createPersistentData(uuid2, factData2.toByteArray());
        List<PersistentData> persistentDatas = new ArrayList<PersistentData>();
        persistentDatas.add(pdata1);
        persistentDatas.add(pdata2);
        when(m_PersistentDataStore.query(eq(LinkLayer.class))).thenReturn(persistentDatas);
        UUID foundUUID = m_SUT.getPersistentUuid("noone");
        assertThat(foundUUID, is(nullValue()));  
    }
@ Test public void testGetPersistentUuidNameNotFound ( ) { UUID uuid1 = UUID . randomUUID ( ) ; UUID uuid2 = UUID . randomUUID ( ) ; FactoryObjectData factData1 = createFactoryObjectData ( "bob" , null ) ; FactoryObjectData factData2 = createFactoryObjectData ( "jack" , null ) ; PersistentData pdata1 = createPersistentData ( uuid1 , factData1 . toByteArray ( ) ) ; PersistentData pdata2 = createPersistentData ( uuid2 , factData2 . toByteArray ( ) ) ; List < PersistentData > persistentDatas = new ArrayList < PersistentData > ( ) ; persistentDatas . add ( pdata1 ) ; persistentDatas . add ( pdata2 ) ; when ( m_PersistentDataStore . query ( eq ( LinkLayer . class ) ) ) . thenReturn ( persistentDatas ) ; UUID foundUUID = m_SUT . getPersistentUuid ( "noone" ) ; assertThat ( foundUUID , is ( nullValue ( ) ) ) ; }
Verify the behavior of getPersistentUuid if the given name is not in the data store
 - the return value should be null if the name is not found.
Verify the behavior of getPersistentUuid if the given name is not in the data store - the return value should be null if the name is not found .
//create UUIDs for stored data //create data entries //create Persistent Data //mock out the query to search //find entity //verify that name was not found in the data store