mil.dod.th.ose.utils/test/mil/dod/th/ose/utils/TestSingleComponent.java
@Test
    public void testNewInstance_MultipleCalls()
    {
        Dictionary<String, Object> props = new Hashtable<>();
        props.put("key", "value");
        
        m_SUT.newInstance(props);
        
        try
        {
            m_SUT.newInstance(props);
            fail("Expecting exception");
        }
        catch (IllegalStateException e)
        {
            
        }
    }
/**
     * Verify only a single instance can be made, that a second call fails.
     */
Verify only a single instance can be made, that a second call fails.
Verify only a single instance can be made that a second call fails .
@Test
    public void testNewInstance_MultipleCalls()
    {
        Dictionary<String, Object> props = new Hashtable<>();
        props.put("key", "value");
        m_SUT.newInstance(props);
        try
        {
            m_SUT.newInstance(props);
            fail("Expecting exception");
        }
        catch (IllegalStateException e)
        {
        }
    }
@ Test public void testNewInstance_MultipleCalls ( ) { Dictionary < String , Object > props = new Hashtable < > ( ) ; props . put ( "key" , "value" ) ; m_SUT . newInstance ( props ) ; try { m_SUT . newInstance ( props ) ; fail ( "Expecting exception" ) ; } catch ( IllegalStateException e ) { } }
Verify only a single instance can be made, that a second call fails.
Verify only a single instance can be made that a second call fails .