mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestControllerHistoryMgr.java
private void mockControllerData()
    {
        final ControllerHistory localhost = new ControllerHistory();
        localhost.setControllerId(0);
        localhost.setControllerName("generic-controller");
        localhost.setHostName("localhost");
        localhost.setLastConnected(19000);
        localhost.setPort(4000);
        localhost.setSslEnabled(false);
        
        final ControllerHistory controller1 = new ControllerHistory();
        controller1.setControllerId(5);
        controller1.setControllerName("Roof");
        controller1.setHostName("10.110.7.90");
        controller1.setLastConnected(5000);
        controller1.setPort(3001);
        controller1.setSslEnabled(true);
        
        final ControllerHistory controller2 = new ControllerHistory();
        controller2.setControllerId(5);
        controller2.setControllerName("House");
        controller2.setHostName("192.168.2.1");
        controller2.setLastConnected(75000);
        controller2.setPort(8976);
        controller2.setSslEnabled(false);
        
        final PersistentData localhostData = new PersistentData(UUID.randomUUID(), localhost.getHostName(), 
                ControllerHistory.class.getName(), localhost);
        final PersistentData controller1Data = new PersistentData(UUID.randomUUID(), controller1.getHostName(), 
                ControllerHistory.class.getName(), controller1);
        final PersistentData controller2Data = new PersistentData(UUID.randomUUID(), controller2.getHostName(), 
                ControllerHistory.class.getName(), controller2);
        
        final Collection<PersistentData> data = new HashSet<>();
        data.add(localhostData);
        data.add(controller1Data);
        data.add(controller2Data);
        
        when(m_DataStore.query(ControllerHistory.class)).thenReturn(data);
    }
/**
     * Creates mock controller history to be returned by the persistent data store.
     */
Creates mock controller history to be returned by the persistent data store.
Creates mock controller history to be returned by the persistent data store .
private void mockControllerData()
    {
        final ControllerHistory localhost = new ControllerHistory();
        localhost.setControllerId(0);
        localhost.setControllerName("generic-controller");
        localhost.setHostName("localhost");
        localhost.setLastConnected(19000);
        localhost.setPort(4000);
        localhost.setSslEnabled(false);
        final ControllerHistory controller1 = new ControllerHistory();
        controller1.setControllerId(5);
        controller1.setControllerName("Roof");
        controller1.setHostName("10.110.7.90");
        controller1.setLastConnected(5000);
        controller1.setPort(3001);
        controller1.setSslEnabled(true);
        final ControllerHistory controller2 = new ControllerHistory();
        controller2.setControllerId(5);
        controller2.setControllerName("House");
        controller2.setHostName("192.168.2.1");
        controller2.setLastConnected(75000);
        controller2.setPort(8976);
        controller2.setSslEnabled(false);
        final PersistentData localhostData = new PersistentData(UUID.randomUUID(), localhost.getHostName(), 
                ControllerHistory.class.getName(), localhost);
        final PersistentData controller1Data = new PersistentData(UUID.randomUUID(), controller1.getHostName(), 
                ControllerHistory.class.getName(), controller1);
        final PersistentData controller2Data = new PersistentData(UUID.randomUUID(), controller2.getHostName(), 
                ControllerHistory.class.getName(), controller2);
        final Collection<PersistentData> data = new HashSet<>();
        data.add(localhostData);
        data.add(controller1Data);
        data.add(controller2Data);
        when(m_DataStore.query(ControllerHistory.class)).thenReturn(data);
    }
private void mockControllerData ( ) { final ControllerHistory localhost = new ControllerHistory ( ) ; localhost . setControllerId ( 0 ) ; localhost . setControllerName ( "generic-controller" ) ; localhost . setHostName ( "localhost" ) ; localhost . setLastConnected ( 19000 ) ; localhost . setPort ( 4000 ) ; localhost . setSslEnabled ( false ) ; final ControllerHistory controller1 = new ControllerHistory ( ) ; controller1 . setControllerId ( 5 ) ; controller1 . setControllerName ( "Roof" ) ; controller1 . setHostName ( "10.110.7.90" ) ; controller1 . setLastConnected ( 5000 ) ; controller1 . setPort ( 3001 ) ; controller1 . setSslEnabled ( true ) ; final ControllerHistory controller2 = new ControllerHistory ( ) ; controller2 . setControllerId ( 5 ) ; controller2 . setControllerName ( "House" ) ; controller2 . setHostName ( "192.168.2.1" ) ; controller2 . setLastConnected ( 75000 ) ; controller2 . setPort ( 8976 ) ; controller2 . setSslEnabled ( false ) ; final PersistentData localhostData = new PersistentData ( UUID . randomUUID ( ) , localhost . getHostName ( ) , ControllerHistory . class . getName ( ) , localhost ) ; final PersistentData controller1Data = new PersistentData ( UUID . randomUUID ( ) , controller1 . getHostName ( ) , ControllerHistory . class . getName ( ) , controller1 ) ; final PersistentData controller2Data = new PersistentData ( UUID . randomUUID ( ) , controller2 . getHostName ( ) , ControllerHistory . class . getName ( ) , controller2 ) ; final Collection < PersistentData > data = new HashSet < > ( ) ; data . add ( localhostData ) ; data . add ( controller1Data ) ; data . add ( controller2Data ) ; when ( m_DataStore . query ( ControllerHistory . class ) ) . thenReturn ( data ) ; }
Creates mock controller history to be returned by the persistent data store.
Creates mock controller history to be returned by the persistent data store .