@Override
  public void start() {
    checkState(ceMainThread == null, "start() can not be called twice");
    // start main thread
    ceMainThread = new CeMainThread();
    ceMainThread.start();
  }
@Test
  public void start_throws_ISE_when_called_twice() {
    CeServer ceServer = newCeServer();

    ceServer.start();

    assertThatThrownBy(ceServer::start)
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("start() can not be called twice");
  }