+ @Test
+ public void testRouteAdd() throws URISyntaxException, InterruptedException {
+ new TestKit(system) {
+ {
+ // Test announcements
+ final TestKit probeReg = new TestKit(system);
+ final ActorRef rpcRegistry = probeReg.getRef();
+
+ final RpcListener rpcListener = new RpcListener(rpcRegistry);
+ rpcListener.onRpcAvailable(Collections.singleton(RPC_ID));
+ probeReg.expectMsgClass(RpcRegistry.Messages.AddOrUpdateRoutes.class);
+ }
+ };
+ }
+
+ @Test
+ public void testRouteRemove() throws URISyntaxException, InterruptedException {
+ new TestKit(system) {
+ {
+ // Test announcements
+ final TestKit probeReg = new TestKit(system);
+ final ActorRef rpcRegistry = probeReg.getRef();
+
+ final RpcListener rpcListener = new RpcListener(rpcRegistry);
+ rpcListener.onRpcUnavailable(Collections.singleton(RPC_ID));
+ probeReg.expectMsgClass(RpcRegistry.Messages.RemoveRoutes.class);
+ }
+ };
+ }