mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/data/TestBaseFactoryObjectDataManager.java
@Test
    public void testSetPidParseException()
    {
        //mock factory object persistent data entry with invalid data
        UUID uuid = UUID.randomUUID();
        createPersistentData(uuid, new byte[]{1,2,3,4,5,6});
        
        //run the method, expecting exception
        try
        {
            m_SUT.setPid(uuid, "cantSetMe");
            fail("FactoryObjectInformationExceptionExpected");
        }
        catch (final FactoryObjectInformationException ex)
        {
            //exception expected, caused by bad parse - InvalidProtocolBuffer
            assertThat(ex.getCause().getClass().getName(), is(InvalidProtocolBufferException.class.getName()));
        }
    }
/**
     * Verify the behavior of setPid() when the factory data for the given UUID cannot be parsed
     * - A FactoryObjectInformationException should be thrown
     */
Verify the behavior of setPid() when the factory data for the given UUID cannot be parsed
- A FactoryObjectInformationException should be thrown
Verify the behavior of setPid () when the factory data for the given UUID cannot be parsed - A FactoryObjectInformationException should be thrown
@Test
    public void testSetPidParseException()
    {
        UUID uuid = UUID.randomUUID();
        createPersistentData(uuid, new byte[]{1,2,3,4,5,6});
        try
        {
            m_SUT.setPid(uuid, "cantSetMe");
            fail("FactoryObjectInformationExceptionExpected");
        }
        catch (final FactoryObjectInformationException ex)
        {
            assertThat(ex.getCause().getClass().getName(), is(InvalidProtocolBufferException.class.getName()));
        }
    }
@ Test public void testSetPidParseException ( ) { UUID uuid = UUID . randomUUID ( ) ; createPersistentData ( uuid , new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ) ; try { m_SUT . setPid ( uuid , "cantSetMe" ) ; fail ( "FactoryObjectInformationExceptionExpected" ) ; } catch ( final FactoryObjectInformationException ex ) { assertThat ( ex . getCause ( ) . getClass ( ) . getName ( ) , is ( InvalidProtocolBufferException . class . getName ( ) ) ) ; } }
Verify the behavior of setPid() when the factory data for the given UUID cannot be parsed
 - A FactoryObjectInformationException should be thrown
Verify the behavior of setPid () when the factory data for the given UUID cannot be parsed - A FactoryObjectInformationException should be thrown
//mock factory object persistent data entry with invalid data //run the method, expecting exception //exception expected, caused by bad parse - InvalidProtocolBuffer