RemoteOpsProvider implements AutoCloseable { public void start() { LOG.info("Starting Remote Ops service..."); opsManager = actorSystem.actorOf(OpsManager.props(rpcProvisionRegistry, rpcService, config, actionProvisionRegistry, actionService), config.getRpcManagerName()); LOG.debug("Ops Manager started at {}", opsManager); } RemoteOpsProvider(final ActorSystem actorSystem, final DOMRpcProviderService rpcProvisionRegistry,
                             final DOMRpcService rpcService, final RemoteOpsProviderConfig config,
                             final DOMActionProviderService actionProviderService,
                             final DOMActionService actionService); @Override void close(); void start();  }
@Test public void testRemoteRpcProvider() throws Exception { try (RemoteOpsProvider rpcProvider = new RemoteOpsProvider(system, mock(DOMRpcProviderService.class), mock(DOMRpcService.class), new RemoteOpsProviderConfig(system.settings().config()), mock(DOMActionProviderService.class), mock(DOMActionService.class))) { rpcProvider.start(); final ActorRef actorRef = Await.result( system.actorSelection(moduleConfig.getRpcManagerPath()).resolveOne( FiniteDuration.create(1, TimeUnit.SECONDS)), FiniteDuration.create(2, TimeUnit.SECONDS)); assertTrue(actorRef.path().toString().contains(moduleConfig.getRpcManagerPath())); } }