mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/data/TestBaseFactoryObjectDataManager.java
@Test
    public void testClearPidNoPid() throws FactoryObjectInformationException, IllegalArgumentException,
        PersistenceFailedException
    {
        //mock factory object persistent data entry, don't include a PID
        UUID uuid = UUID.randomUUID();
        FactoryObjectData factData = createFactoryObjectData("name", null);
        PersistentData persistentData = createPersistentData(uuid, factData.toByteArray());
   
        //run the method, not expecting any exceptions
        m_SUT.clearPid(uuid);
       
        //verify that the persistent data entry is never updated, there's no need do a merge of data
        verify(persistentData, times(0)).setEntity(factData.toByteArray());   
    }
/**
     * Verify expected behavior of clearPid() if the data exists but does not have a PID value.
     * - There should be no change in the PersistentData entry for the given object
     */
Verify expected behavior of clearPid() if the data exists but does not have a PID value.
- There should be no change in the PersistentData entry for the given object
Verify expected behavior of clearPid () if the data exists but does not have a PID value . - There should be no change in the PersistentData entry for the given object
@Test
    public void testClearPidNoPid() throws FactoryObjectInformationException, IllegalArgumentException,
        PersistenceFailedException
    {
        UUID uuid = UUID.randomUUID();
        FactoryObjectData factData = createFactoryObjectData("name", null);
        PersistentData persistentData = createPersistentData(uuid, factData.toByteArray());
        m_SUT.clearPid(uuid);
        verify(persistentData, times(0)).setEntity(factData.toByteArray());   
    }
@ Test public void testClearPidNoPid ( ) throws FactoryObjectInformationException , IllegalArgumentException , PersistenceFailedException { UUID uuid = UUID . randomUUID ( ) ; FactoryObjectData factData = createFactoryObjectData ( "name" , null ) ; PersistentData persistentData = createPersistentData ( uuid , factData . toByteArray ( ) ) ; m_SUT . clearPid ( uuid ) ; verify ( persistentData , times ( 0 ) ) . setEntity ( factData . toByteArray ( ) ) ; }
Verify expected behavior of clearPid() if the data exists but does not have a PID value.
Verify expected behavior of clearPid () if the data exists but does not have a PID value .
//mock factory object persistent data entry, don't include a PID //run the method, not expecting any exceptions //verify that the persistent data entry is never updated, there's no need do a merge of data