MainMethodExceptionHandler { public static MainMethodExceptionHandler getInstance(final Logger logger) { return new MainMethodExceptionHandler(checkNotNull(logger, "logger")); } private  MainMethodExceptionHandler(final Logger theLogger); static MainMethodExceptionHandler getInstance(final Logger logger); ActorSystem call(final Callable<ActorSystem> mainMethodBody);  }
@SuppressWarnings("ConstantConditions") @Test public void tryToCreateInstanceWithNullLogger() { assertThatNullPointerException() .isThrownBy(() -> MainMethodExceptionHandler.getInstance(null)) .withMessage("The %s must not be null!", "logger") .withNoCause(); }