public final TestSubscriber<T> assertError(Class<? extends Throwable> clazz){
  assertNotComplete();
  int s=errors.size();
  if (s == 0) {
    throw new AssertionError("No error",null);
  }
  if (s == 1) {
    Throwable e=errors.get(0);
    if (!clazz.isInstance(e)) {
      throw new AssertionError("Error class incompatible: expected = " + clazz + ", actual = "+ e,null);
    }
  }
  if (s > 1) {
    throw new AssertionError("Multiple errors: " + s,null);
  }
  return this;
}

public final TestSubscriber < T > assertError ( Class < ? extends Throwable > clazz ) { assertNotComplete ( ) ; int s = errors . size ( ) ; if ( s == 0 ) { throw new AssertionError ( "No error" , null ) ; } if ( s == 1 ) { Throwable e = errors . get ( 0 ) ; if ( ! clazz . isInstance ( e ) ) { throw new AssertionError ( "Error class incompatible: expected = " + clazz + ", actual = " + e , null ) ; } } if ( s > 1 ) { throw new AssertionError ( "Multiple errors: " + s , null ) ; } return this ; }
assert an error signal has been received .
