code: @Then("^an exception '(.+?)' thrown( with class '(.+?)'( and message like '(.+?)')?)?")
      public void assertExceptionNotThrown(String exception, String foo, String clazz, String bar, String exceptionMsg)
              throws ClassNotFoundException {
          List<Exception> exceptions = commonspec.getExceptions();
          if ("IS NOT".equals(exception)) {
              assertThat(exceptions).as("Captured exception list is not empty").isEmpty();
          } else {
              assertThat(exceptions).as("Captured exception list is empty").isNotEmpty();
              Exception ex = exceptions.get(exceptions.size() - 1);
              if ((clazz != null) && (exceptionMsg != null)) {
                  assertThat(ex.toString()).as("Unexpected last exception class").contains(clazz);
                  assertThat(ex.toString()).as("Unexpected last exception message").contains(exceptionMsg);
  
              } else if (clazz != null) {
                  assertThat(exceptions.get(exceptions.size() - 1).getClass().getSimpleName()).as("Unexpected last exception class").isEqualTo(clazz);
              }
  
              commonspec.getExceptions().clear();
          }
      }
docs: Checks if an exception has been thrown.
  
  @param exception    : "IS NOT" | "IS"
  @param foo
  @param clazz
  @param bar
  @param exceptionMsg