/**
  * Tests the behavior of the manager as it starts up.
  *
  * @throws Exception
  */
 public void testStartIcpServer() throws Exception {
   assertFalse(testableIcpManager.isIcpServerRunning());
   assertNegative(testableIcpManager.getCurrentPort());
   setConfigCalled = false;
   int port = getNewPort();
   setEnabled(true, port);
   assertTrue(setConfigCalled);
   assertTrue(testableIcpManager.isIcpServerRunning());
   assertEquals(port, testableIcpManager.getCurrentPort());
 }
 /* Inherit documentation */
 public void setUp() throws Exception {
   super.setUp();
   ConfigurationUtil.addFromArgs(
       "org.lockss.log.IcpManager.level",
       "debug3",
       "org.lockss.log.IcpSocketImpl.level",
       "debug3");
   setEnabled(false, BAD_PORT);
   setConfigCalled = false;
   mockLockssDaemon = getMockLockssDaemon();
   testableIcpManager = new TestableIcpManager();
   mockLockssDaemon.setIcpManager(testableIcpManager);
   testableIcpManager.initService(mockLockssDaemon);
   mockLockssDaemon.setDaemonInited(true);
   testableIcpManager.startService();
 }
 /* Inherit documentation */
 public void tearDown() {
   testableIcpManager.stopService();
 }