mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/TestAbstractFactoryObject.java
@SuppressWarnings("unchecked")
    @Test
    public void testLatchCountdown() throws ConfigurationException, IllegalArgumentException, IllegalStateException, 
        FactoryException, IOException
    {
        Configuration config = ConfigurationAdminMocker.getConfigByPid(OBJ_PID);
        doNothing().when(config).update(Mockito.any(Dictionary.class));
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("key", "value");
        //try to set the property, and exception should be thrown
        try
        {
            m_SUT.setProperties(props);
            fail("Expected exception due to time out");
        }
        catch (FactoryException e)
        {
            //expected timeout
        }
    }
/**
     * Test that the latch countdown will report a timeout if blocking update method is not called to countdown
     * the latch.
     */
Test that the latch countdown will report a timeout if blocking update method is not called to countdown
the latch.
Test that the latch countdown will report a timeout if blocking update method is not called to countdown the latch .
@SuppressWarnings("unchecked")
    @Test
    public void testLatchCountdown() throws ConfigurationException, IllegalArgumentException, IllegalStateException, 
        FactoryException, IOException
    {
        Configuration config = ConfigurationAdminMocker.getConfigByPid(OBJ_PID);
        doNothing().when(config).update(Mockito.any(Dictionary.class));
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("key", "value");
        try
        {
            m_SUT.setProperties(props);
            fail("Expected exception due to time out");
        }
        catch (FactoryException e)
        {
        }
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testLatchCountdown ( ) throws ConfigurationException , IllegalArgumentException , IllegalStateException , FactoryException , IOException { Configuration config = ConfigurationAdminMocker . getConfigByPid ( OBJ_PID ) ; doNothing ( ) . when ( config ) . update ( Mockito . any ( Dictionary . class ) ) ; Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( "key" , "value" ) ; try { m_SUT . setProperties ( props ) ; fail ( "Expected exception due to time out" ) ; } catch ( FactoryException e ) { } }
Test that the latch countdown will report a timeout if blocking update method is not called to countdown
 the latch.
Test that the latch countdown will report a timeout if blocking update method is not called to countdown the latch .
//try to set the property, and exception should be thrown //expected timeout