mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestControllerHistoryMgr.java
@Test
    public void testGetControllerHistoryMaxList()
    {
        mockLargeNumberControllerData();
        assertThat(m_DataStore.query(ControllerHistory.class).size(), is(13));
        
        Map<String, ControllerHistory> historyMap = m_SUT.getControllerHistory();
        assertThat(historyMap.size(), is(10));
        assertThat(historyMap.containsKey("127.0.0.1:generic-controller"), is(true));
        assertThat(historyMap.containsKey("192.168.1.12:test12"), is(true));
        assertThat(historyMap.containsKey("192.168.1.11:test11"), is(true));
        assertThat(historyMap.containsKey("192.168.1.10:test10"), is(true));
        assertThat(historyMap.containsKey("192.168.1.9:test9"), is(true));
        assertThat(historyMap.containsKey("192.168.1.8:test8"), is(true));
        assertThat(historyMap.containsKey("192.168.1.7:test7"), is(true));
        assertThat(historyMap.containsKey("192.168.1.6:test6"), is(true));
        assertThat(historyMap.containsKey("192.168.1.5:test5"), is(true));
        assertThat(historyMap.containsKey("192.168.1.4:test4"), is(true));
        
        assertThat(historyMap.containsKey("192.168.1.3:test3"), is(false));
        assertThat(historyMap.containsKey("192.168.1.2:test2"), is(false));
        assertThat(historyMap.containsKey("192.168.1.1:test1"), is(false));
    }
/**
     * Verify that the controller history map only contains the last 9 controllers that have been connected to and 
     * localhost.
     */
Verify that the controller history map only contains the last 9 controllers that have been connected to and
localhost.
Verify that the controller history map only contains the last 9 controllers that have been connected to and localhost .
@Test
    public void testGetControllerHistoryMaxList()
    {
        mockLargeNumberControllerData();
        assertThat(m_DataStore.query(ControllerHistory.class).size(), is(13));
        Map<String, ControllerHistory> historyMap = m_SUT.getControllerHistory();
        assertThat(historyMap.size(), is(10));
        assertThat(historyMap.containsKey("127.0.0.1:generic-controller"), is(true));
        assertThat(historyMap.containsKey("192.168.1.12:test12"), is(true));
        assertThat(historyMap.containsKey("192.168.1.11:test11"), is(true));
        assertThat(historyMap.containsKey("192.168.1.10:test10"), is(true));
        assertThat(historyMap.containsKey("192.168.1.9:test9"), is(true));
        assertThat(historyMap.containsKey("192.168.1.8:test8"), is(true));
        assertThat(historyMap.containsKey("192.168.1.7:test7"), is(true));
        assertThat(historyMap.containsKey("192.168.1.6:test6"), is(true));
        assertThat(historyMap.containsKey("192.168.1.5:test5"), is(true));
        assertThat(historyMap.containsKey("192.168.1.4:test4"), is(true));
        assertThat(historyMap.containsKey("192.168.1.3:test3"), is(false));
        assertThat(historyMap.containsKey("192.168.1.2:test2"), is(false));
        assertThat(historyMap.containsKey("192.168.1.1:test1"), is(false));
    }
@ Test public void testGetControllerHistoryMaxList ( ) { mockLargeNumberControllerData ( ) ; assertThat ( m_DataStore . query ( ControllerHistory . class ) . size ( ) , is ( 13 ) ) ; Map < String , ControllerHistory > historyMap = m_SUT . getControllerHistory ( ) ; assertThat ( historyMap . size ( ) , is ( 10 ) ) ; assertThat ( historyMap . containsKey ( "127.0.0.1:generic-controller" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.12:test12" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.11:test11" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.10:test10" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.9:test9" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.8:test8" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.7:test7" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.6:test6" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.5:test5" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.4:test4" ) , is ( true ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.3:test3" ) , is ( false ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.2:test2" ) , is ( false ) ) ; assertThat ( historyMap . containsKey ( "192.168.1.1:test1" ) , is ( false ) ) ; }
Verify that the controller history map only contains the last 9 controllers that have been connected to and
 localhost.
Verify that the controller history map only contains the last 9 controllers that have been connected to and localhost .