private void testDeployFromThrowableInStart(int startAction, Class<? extends Throwable> expectedThrowable) throws Exception {
MyVerticle verticle = new MyVerticle();
vertx.deployVerticle(verticle, ar -> {
assertTrue(ar.succeeded());
Context ctx = vertx.context();
MyVerticle verticle2 = new MyVerticle(startAction, MyVerticle.NOOP);
vertx.deployVerticle(verticle2, ar2 -> {
assertFalse(ar2.succeeded());
assertEquals(expectedThrowable, ar2.cause().getClass());
assertEquals("FooBar!", ar2.cause().getMessage());
assertEquals(1, vertx.deployments().size());
Context ctx2 = vertx.context();
assertEquals(ctx, ctx2);
testComplete();
});
});
await();