code: public final void assertState(int expected)
                      throws InvalidBeanOStateException
      {
          if (state != expected) {
              throw new InvalidBeanOStateException(getStateName(state),
                              getStateName(expected));
          }
      }
docs: Verify that this <code>BeanO</code> is in the specified state. <p>
  
  @param expected an <code>int</code> specifying the expected state <p>
  
  @exception InvalidBeanOStateException thrown if
  the current state of this <code>BeanO</code> is not equal
  to the expected state <p>