@Test (timeout= 50000 )
public void testStartStopServer() throws Exception {

  historyServer = new JobHistoryServer();
  Configuration config = new Configuration();
  historyServer.init(config);
  assertEquals(STATE.INITED, historyServer.getServiceState());
  assertEquals(6, historyServer.getServices().size());
  HistoryClientService historyService = historyServer.getClientService();
  assertNotNull(historyServer.getClientService());
  assertEquals(STATE.INITED, historyService.getServiceState());
  historyServer.start();
  assertEquals(STATE.STARTED, historyServer.getServiceState());
  assertEquals(STATE.STARTED, historyService.getServiceState());
  historyServer.stop();
  assertEquals(STATE.STOPPED, historyServer.getServiceState());
  assertNotNull(historyService.getClientHandler().getConnectAddress());
}