mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/link/TestLinkLayerImpl.java
@Test
    public void testGetConfig() throws Exception
    {
        Dictionary<String, Object> table = new Hashtable<>();
        Configuration config = ConfigurationAdminMocker.addMockConfiguration(m_SUT);
        when(config.getProperties()).thenReturn(table);
        
        // verify defaults, ignore physical link name as it is required
        assertThat(m_SUT.getConfig().readTimeoutMs(), is(0));
        assertThat(m_SUT.getConfig().retries(), is(2));
        
        // test overrides
        table.put(LinkLayerAttributes.CONFIG_PROP_PHYSICAL_LINK_NAME, "blah");
        table.put(LinkLayerAttributes.CONFIG_PROP_RETRIES, 3);
        table.put(LinkLayerAttributes.CONFIG_PROP_READ_TIMEOUT_MS, 500);
        assertThat(m_SUT.getConfig().physicalLinkName(), is("blah"));
        assertThat(m_SUT.getConfig().readTimeoutMs(), is(500));
        assertThat(m_SUT.getConfig().retries(), is(3));        
    }
/**
     * Verify {@link LinkLayerImpl#getConfig()} will return an object with the default properties and set properties.
     */
Verify  LinkLayerImpl#getConfig() will return an object with the default properties and set properties.
Verify LinkLayerImpl#getConfig () will return an object with the default properties and set properties .
@Test
    public void testGetConfig() throws Exception
    {
        Dictionary<String, Object> table = new Hashtable<>();
        Configuration config = ConfigurationAdminMocker.addMockConfiguration(m_SUT);
        when(config.getProperties()).thenReturn(table);
        assertThat(m_SUT.getConfig().readTimeoutMs(), is(0));
        assertThat(m_SUT.getConfig().retries(), is(2));
        table.put(LinkLayerAttributes.CONFIG_PROP_PHYSICAL_LINK_NAME, "blah");
        table.put(LinkLayerAttributes.CONFIG_PROP_RETRIES, 3);
        table.put(LinkLayerAttributes.CONFIG_PROP_READ_TIMEOUT_MS, 500);
        assertThat(m_SUT.getConfig().physicalLinkName(), is("blah"));
        assertThat(m_SUT.getConfig().readTimeoutMs(), is(500));
        assertThat(m_SUT.getConfig().retries(), is(3));        
    }
@ Test public void testGetConfig ( ) throws Exception { Dictionary < String , Object > table = new Hashtable < > ( ) ; Configuration config = ConfigurationAdminMocker . addMockConfiguration ( m_SUT ) ; when ( config . getProperties ( ) ) . thenReturn ( table ) ; assertThat ( m_SUT . getConfig ( ) . readTimeoutMs ( ) , is ( 0 ) ) ; assertThat ( m_SUT . getConfig ( ) . retries ( ) , is ( 2 ) ) ; table . put ( LinkLayerAttributes . CONFIG_PROP_PHYSICAL_LINK_NAME , "blah" ) ; table . put ( LinkLayerAttributes . CONFIG_PROP_RETRIES , 3 ) ; table . put ( LinkLayerAttributes . CONFIG_PROP_READ_TIMEOUT_MS , 500 ) ; assertThat ( m_SUT . getConfig ( ) . physicalLinkName ( ) , is ( "blah" ) ) ; assertThat ( m_SUT . getConfig ( ) . readTimeoutMs ( ) , is ( 500 ) ) ; assertThat ( m_SUT . getConfig ( ) . retries ( ) , is ( 3 ) ) ; }
Verify {@link LinkLayerImpl#getConfig()} will return an object with the default properties and set properties.
Verify { @link LinkLayerImpl#getConfig () } will return an object with the default properties and set properties .
// verify defaults, ignore physical link name as it is required // test overrides