BlockedNamespaces extends DistributedData<ORSet<String>> { public static BlockedNamespaces create(final DistributedDataConfig config, final ActorSystem system) { return new BlockedNamespaces(config, system); } private  BlockedNamespaces(final DistributedDataConfig config, final ActorSystem system); static BlockedNamespaces of(final ActorSystem system); static BlockedNamespaces create(final DistributedDataConfig config, final ActorSystem system); CompletionStage<Boolean> contains(final String namespace); CompletionStage<Void> add(final String namespace); CompletionStage<Void> remove(final String namespace); static final String CLUSTER_ROLE; static final String ACTOR_NAME; }
@Test public void startWithoutRole() throws Exception { testCRUD(BlockedNamespaces.create(config, actorSystem), actorSystem); }
@Test public void startWithMatchingRole() throws Exception { testCRUD(BlockedNamespaces.create(DistributedData.createConfig(actorSystem, "replicator", "ddata-aware"), actorSystem), actorSystem); }
@Test public void startWithWrongRole() { actorSystem.eventStream().setLogLevel(Attributes.logLevelOff()); new TestKit(actorSystem) {{ final BlockedNamespaces underTest = BlockedNamespaces.create(DistributedData.createConfig(actorSystem, "replicator", "wrong-role"), actorSystem); watch(underTest.getReplicator()); expectTerminated(underTest.getReplicator()); }}; }