mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/configuration/TestConfigPageDisplayHelperImpl.java
@SuppressWarnings("unchecked")
    @Test
    public void testGetPanelCollapsedStatus() throws SecurityException, IllegalArgumentException, NoSuchFieldException, 
        IllegalAccessException
    {
        addConfigToMap();
        
        PanelCollapsedStatus status = m_SUT.getPanelCollapsedStatus(CONTROLLERID, "config PID");
        assertThat(status.isCollapsed(), is(false));
        
        Field map = m_SUT.getClass().getDeclaredField("m_ConfigPanelCollapsedStatus");
        map.setAccessible(true);
        Map<Integer, Map<String, PanelCollapsedStatus>> statusMap = 
                (Map<Integer, Map<String, PanelCollapsedStatus>>)map.get(m_SUT);
        
        assertThat(statusMap.get(CONTROLLERID).size(), is(3));
        status = m_SUT.getPanelCollapsedStatus(CONTROLLERID, "doesn't exist... yet");
        assertThat(status.isCollapsed(), is(true));
        assertThat(statusMap.get(CONTROLLERID).size(), is(4));
        
        assertThat(statusMap.containsKey(5000), is(false));
        status = m_SUT.getPanelCollapsedStatus(5000, "doesn't exist either...");
        assertThat(status.isCollapsed(), is(true));
        assertThat(statusMap.containsKey(5000), is(true));
        assertThat(statusMap.get(5000).size(), is(1));
    }
/**
     * Test the getPanelCollapsedStatus method.
     * Verify that the appropriate status is returned.
     */
Test the getPanelCollapsedStatus method.
Verify that the appropriate status is returned.
Test the getPanelCollapsedStatus method . Verify that the appropriate status is returned .
@SuppressWarnings("unchecked")
    @Test
    public void testGetPanelCollapsedStatus() throws SecurityException, IllegalArgumentException, NoSuchFieldException, 
        IllegalAccessException
    {
        addConfigToMap();
        PanelCollapsedStatus status = m_SUT.getPanelCollapsedStatus(CONTROLLERID, "config PID");
        assertThat(status.isCollapsed(), is(false));
        Field map = m_SUT.getClass().getDeclaredField("m_ConfigPanelCollapsedStatus");
        map.setAccessible(true);
        Map<Integer, Map<String, PanelCollapsedStatus>> statusMap = 
                (Map<Integer, Map<String, PanelCollapsedStatus>>)map.get(m_SUT);
        assertThat(statusMap.get(CONTROLLERID).size(), is(3));
        status = m_SUT.getPanelCollapsedStatus(CONTROLLERID, "doesn't exist... yet");
        assertThat(status.isCollapsed(), is(true));
        assertThat(statusMap.get(CONTROLLERID).size(), is(4));
        assertThat(statusMap.containsKey(5000), is(false));
        status = m_SUT.getPanelCollapsedStatus(5000, "doesn't exist either...");
        assertThat(status.isCollapsed(), is(true));
        assertThat(statusMap.containsKey(5000), is(true));
        assertThat(statusMap.get(5000).size(), is(1));
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testGetPanelCollapsedStatus ( ) throws SecurityException , IllegalArgumentException , NoSuchFieldException , IllegalAccessException { addConfigToMap ( ) ; PanelCollapsedStatus status = m_SUT . getPanelCollapsedStatus ( CONTROLLERID , "config PID" ) ; assertThat ( status . isCollapsed ( ) , is ( false ) ) ; Field map = m_SUT . getClass ( ) . getDeclaredField ( "m_ConfigPanelCollapsedStatus" ) ; map . setAccessible ( true ) ; Map < Integer , Map < String , PanelCollapsedStatus > > statusMap = ( Map < Integer , Map < String , PanelCollapsedStatus > > ) map . get ( m_SUT ) ; assertThat ( statusMap . get ( CONTROLLERID ) . size ( ) , is ( 3 ) ) ; status = m_SUT . getPanelCollapsedStatus ( CONTROLLERID , "doesn't exist... yet" ) ; assertThat ( status . isCollapsed ( ) , is ( true ) ) ; assertThat ( statusMap . get ( CONTROLLERID ) . size ( ) , is ( 4 ) ) ; assertThat ( statusMap . containsKey ( 5000 ) , is ( false ) ) ; status = m_SUT . getPanelCollapsedStatus ( 5000 , "doesn't exist either..." ) ; assertThat ( status . isCollapsed ( ) , is ( true ) ) ; assertThat ( statusMap . containsKey ( 5000 ) , is ( true ) ) ; assertThat ( statusMap . get ( 5000 ) . size ( ) , is ( 1 ) ) ; }
Test the getPanelCollapsedStatus method.
Test the getPanelCollapsedStatus method .