code: public void waitForConnectionState(final ConnectionState.State connectionState) throws InterruptedException, CouldNotPerformException {
          try {
              waitForConnectionState(connectionState, 0);
          } catch (TimeoutException ex) {
              assert false;
          }
      }
docs: Method blocks until the remote reaches the desired connection state.
  
  @param connectionState the desired connection state
  
  @throws InterruptedException                                is thrown in case the thread is externally
  interrupted.
  @throws org.openbase.jul.exception.CouldNotPerformException is thrown in case the
  the remote is not active and the waiting condition is based on  ConnectionState.State CONNECTED or CONNECTING.