org.eclipse.microprofile.fault.tolerance.tck.util

## Class Exceptions

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.util.Exceptions

    public class Exceptions
    extends Object

Utility class, no public constructor

### Nested Class Summary

Nested Classes
`static interface` `Exceptions.ExceptionThrowingAction`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `expect(Class<? extends Exception> expectedException, Exceptions.ExceptionThrowingAction action)` Run an action an ensure that the expected exception is thrown
`static void` `expect(Class<? extends Exception> expectedException, Future<?> future)` Call `future.get()` and check that it throws an ExecutionException wrapping the `expectedException`
`static void` `expectBulkheadException(Exceptions.ExceptionThrowingAction action)` Run an action and check that a `BulkheadException` is thrown
`static void` `expectBulkheadException(Future<?> future)` Run `future.get()` and check that a `BulkheadException` is thrown wrapped in an `ExecutionException`.
`static void` `expectCbOpen(Exceptions.ExceptionThrowingAction action)` Run an action and check that a `CircuitBreakerOpenException` is thrown
`static void` `expectNoException(Exceptions.ExceptionThrowingAction action)` Run an action and ensure that no exception is thrown
`static void` `expectTestException(Exceptions.ExceptionThrowingAction action)` Run an action and check that a `TestException` is thrown
`static void` `expectTimeout(Exceptions.ExceptionThrowingAction action)` Run an action an check that a timeout exception is thrown

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### expectTimeout

    public static void expectTimeout(Exceptions.ExceptionThrowingAction action)

Run an action an check that a timeout exception is thrown

Parameters:
  `action` - The action to run

#### expectTestException

    public static void expectTestException(Exceptions.ExceptionThrowingAction action)

Run an action and check that a `TestException` is thrown

Parameters:
  `action` - The action to run

#### expectCbOpen

    public static void expectCbOpen(Exceptions.ExceptionThrowingAction action)

Run an action and check that a `CircuitBreakerOpenException` is thrown

Parameters:
  `action` - The action to run

#### expectBulkheadException

    public static void expectBulkheadException(Exceptions.ExceptionThrowingAction action)

Run an action and check that a `BulkheadException` is thrown

Parameters:
  `action` - The action to run

#### expectBulkheadException

    public static void expectBulkheadException(Future<?> future)

Run `future.get()` and check that a `BulkheadException` is thrown wrapped in an `ExecutionException`.

Parameters:
  `future` - the action to run

#### expect

    public static void expect(Class<? extends Exception> expectedException,
                              Future<?> future)

Call `future.get()` and check that it throws an ExecutionException wrapping the `expectedException`

Parameters:
  `expectedException` - the expected exception type
  `future` - the future to check

#### expect

    public static void expect(Class<? extends Exception> expectedException,
                              Exceptions.ExceptionThrowingAction action)

Run an action an ensure that the expected exception is thrown

Parameters:
  `expectedException` - the exception class to expect
  `action` - the action to run

#### expectNoException

    public static void expectNoException(Exceptions.ExceptionThrowingAction action)

Run an action and ensure that no exception is thrown

Parameters:
  `action` - the action to run