code: public void waitForState( final long bundleId,
                                final int state,
                                final long timeoutInMillis )
          throws TimeoutException
      {
          try
          {
              getRemoteBundleContext().waitForState( bundleId, state, timeoutInMillis );
          }
          catch( org.ops4j.pax.exam.rbc.internal.TimeoutException e )
          {
              throw new TimeoutException( e.getMessage() );
          }
          catch( RemoteException e )
          {
              throw new TestContainerException( "Remote exception", e );
          }
          catch( BundleException e )
          {
              throw new TestContainerException( "Bundle cannot be found", e );
          }
      }
docs: {@inheritDoc}