public ActorSystem getActorSystem() {
        return actorSystem;
    }
@Test
    void testRpcServiceShutDownWithRpcEndpoints() throws Exception {
        final PekkoRpcService pekkoRpcService = startRpcService();

        try {
            final int numberActors = 5;

            final RpcServiceShutdownTestHelper rpcServiceShutdownTestHelper =
                    startStopNCountingAsynchronousOnStopEndpoints(pekkoRpcService, numberActors);

            for (CompletableFuture<Void> onStopFuture :
                    rpcServiceShutdownTestHelper.getStopFutures()) {
                onStopFuture.complete(null);
            }

            rpcServiceShutdownTestHelper.waitForRpcServiceTermination();
            assertThat(pekkoRpcService.getActorSystem().whenTerminated().isCompleted()).isTrue();
        } finally {
            RpcUtils.terminateRpcService(pekkoRpcService);
        }
    }