### Question:
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final AkkaRpcServiceConfiguration configuration); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> connect(
			final String address,
			final Class<C> clazz); @Override CompletableFuture<C> connect(String address, F fencingToken, Class<C> clazz); @Override RpcServer startServer(C rpcEndpoint); @Override RpcServer fenceRpcServer(RpcServer rpcServer, F fencingToken); @Override void stopServer(RpcServer selfGateway); @Override CompletableFuture<Void> stopService(); @Override CompletableFuture<Void> getTerminationFuture(); @Override Executor getExecutor(); @Override ScheduledExecutor getScheduledExecutor(); @Override ScheduledFuture<?> scheduleRunnable(Runnable runnable, long delay, TimeUnit unit); @Override void execute(Runnable runnable); @Override CompletableFuture<T> execute(Callable<T> callable);  }### Answer:
@Test public void testExecuteRunnable() throws Exception { final OneShotLatch latch = new OneShotLatch(); akkaRpcService.execute(latch::trigger); latch.await(30L, TimeUnit.SECONDS); }
@Test public void testExecuteCallable() throws Exception { final OneShotLatch latch = new OneShotLatch(); final int expected = 42; CompletableFuture<Integer> result = akkaRpcService.execute(() -> { latch.trigger(); return expected; }); int actual = result.get(30L, TimeUnit.SECONDS); assertEquals(expected, actual); assertTrue(latch.isTriggered()); }