@DisplayName("test_startAsync_WithException") @Test void testStartAsyncWithException() { AbstractService serviceStartWithException = new AbstractService() { @Override public void init() throws ServiceException { throw new ServiceException(new IllegalArgumentException("Config File was invalid.")); } }; CompletableFuture<Boolean> future = serviceStartWithException.startAsync(); try { future.join(); fail(); } catch (CompletionException e) { assertEquals(ServiceException.class, e.getCause().getClass()); assertEquals("io.github.ukuz.piccolo.api.service.ServiceException: java.lang.IllegalArgumentException: Config File was invalid.", e.getMessage()); } }
@Override public CompletableFuture<Boolean> startAsync() { return startAsyncWithCallback(null, null); }
AbstractService implements Service { @Override public CompletableFuture<Boolean> startAsync() { return startAsyncWithCallback(null, null); } }
AbstractService implements Service { @Override public CompletableFuture<Boolean> startAsync() { return startAsyncWithCallback(null, null); }  }
AbstractService implements Service { @Override public CompletableFuture<Boolean> startAsync() { return startAsyncWithCallback(null, null); }  @Override CompletableFuture<Boolean> startAsync(); @Override CompletableFuture<Boolean> startAsync(PiccoloContext context); @Override CompletableFuture<Boolean> stopAsync(); final CompletableFuture<Boolean> stopAsyncWithCallback(Callback callback); @Override final boolean start(); @Override boolean start(PiccoloContext context); @Override final boolean stop(); @Override boolean isRunning(); }
AbstractService implements Service { @Override public CompletableFuture<Boolean> startAsync() { return startAsyncWithCallback(null, null); }  @Override CompletableFuture<Boolean> startAsync(); @Override CompletableFuture<Boolean> startAsync(PiccoloContext context); @Override CompletableFuture<Boolean> stopAsync(); final CompletableFuture<Boolean> stopAsyncWithCallback(Callback callback); @Override final boolean start(); @Override boolean start(PiccoloContext context); @Override final boolean stop(); @Override boolean isRunning();  }