assertNotNull(maybeEndpoint);
assertTrue(maybeEndpoint.isPresent());
- final RemoteRpcEndpoint endpoint = maybeEndpoint.get();
+ final RemoteRpcEndpoint endpoint = maybeEndpoint.orElseThrow();
final ActorRef router = endpoint.getRouter();
assertNotNull(router);