vertx/src/test/java/eu/internetofus/common/vertx/AbstractServicesVerticleTest.java
/**
   * Check that not start because can not register repositories.
   *
   * @param testContext context of the test.
   *
   * @throws Exception If the verticle cannot be started.
   */
Check that not start because can not register repositories.
@param testContext context of the test.

@throws Exception If the verticle cannot be started.
Check that not start because can not register repositories . @param testContext context of the test . @throws Exception If the verticle cannot be started .
@Test
  public void shouldNotStartBecauseFailToRegisterServices(final VertxTestContext testContext) throws Exception {
    final Exception cause = new Exception("Cannot register services.");
    doThrow(cause).when(this.verticle).registerServices(any());
    final Promise<Void> startPromise = Promise.promise();
    this.verticle.start(startPromise);
    startPromise.future().onComplete(testContext.failing(error -> testContext.verify(() -> {
      assertThat(error).isEqualTo(cause);
      testContext.completeNow();
    })));
  }
@ Test public void shouldNotStartBecauseFailToRegisterServices ( final VertxTestContext testContext ) throws Exception { final Exception cause = new Exception ( "Cannot register services." ) ; doThrow ( cause ) . when ( this . verticle ) . registerServices ( any ( ) ) ; final Promise < Void > startPromise = Promise . promise ( ) ; this . verticle . start ( startPromise ) ; startPromise . future ( ) . onComplete ( testContext . failing ( error -> testContext . verify ( ( ) -> { assertThat ( error ) . isEqualTo ( cause ) ; testContext . completeNow ( ) ; } ) ) ) ; }
Check that not start because can not register repositories.
Check that not start because can not register repositories .