test_class.declarator: POLICY_SIZE_LIMIT_BYTES = Long.parseLong(
              System.getProperty(PolicyCommandSizeValidator.DITTO_LIMITS_POLICIES_MAX_SIZE_BYTES, "-1"))
test_class.modifier: private static final
test_class.original_string: private static final long POLICY_SIZE_LIMIT_BYTES = Long.parseLong(
              System.getProperty(PolicyCommandSizeValidator.DITTO_LIMITS_POLICIES_MAX_SIZE_BYTES, "-1"));
test_class.type: long
test_class.var_name: POLICY_SIZE_LIMIT_BYTES
test_class.file: services/policies/persistence/src/test/java/org/eclipse/ditto/services/policies/persistence/actors/PolicyPersistenceActorTest.java
test_class.identifier: PolicyPersistenceActorTest
test_class.superclass: extends PersistenceActorTestBase
test_case.body: @Test
      public void checkForActivityOfNonexistentPolicy() {
          new TestKit(actorSystem) {
              {
                  // GIVEN: a PolicyPersistenceActor is created in a parent that forwards all messages to us
                  final PolicyId policyId = PolicyId.of("test.ns", "nonexistent.policy");
                  final Props persistentActorProps =
                          PolicyPersistenceActor.props(policyId, new PolicyMongoSnapshotAdapter(), pubSubMediator);
  
                  final TestProbe errorsProbe = TestProbe.apply(actorSystem);
  
                  final Props parentProps = Props.create(Actor.class, () -> new AbstractActor() {
  
                      @Override
                      public void preStart() {
                          getContext().actorOf(persistentActorProps);
                      }
  
                      @Override
                      public SupervisorStrategy supervisorStrategy() {
                          return new OneForOneStrategy(true,
                                  DeciderBuilder.matchAny(throwable -> {
                                      errorsProbe.ref().tell(throwable, getSelf());
                                      return SupervisorStrategy.restart();
                                  }).build());
                      }
  
                      @Override
                      public Receive createReceive() {
                          return ReceiveBuilder.create()
                                  .matchAny(message -> {
                                      if (getTestActor().equals(getSender())) {
                                          getContext().actorSelection(getSelf().path().child("*"))
                                                  .forward(message, getContext());
                                      } else {
                                          getTestActor().forward(message, getContext());
                                      }
                                  })
                                  .build();
                      }
                  });
  
                  // WHEN: CheckForActivity is sent to a persistence actor of nonexistent policy after startup
                  final ActorRef underTest = actorSystem.actorOf(parentProps);
  
                  final Object checkForActivity = AbstractShardedPersistenceActor.checkForActivity(1L);
                  underTest.tell(checkForActivity, getRef());
                  underTest.tell(checkForActivity, getRef());
                  underTest.tell(checkForActivity, getRef());
  
                  // THEN: persistence actor requests shutdown
                  expectMsg(PolicySupervisorActor.Control.PASSIVATE);
  
                  // THEN: persistence actor should not throw anything.
                  errorsProbe.expectNoMessage(scala.concurrent.duration.Duration.create(3, TimeUnit.SECONDS));
              }
          };
      }
test_case.class_method_signature: PolicyPersistenceActorTest.checkForActivityOfNonexistentPolicy()
test_case.full_signature: @Test public void checkForActivityOfNonexistentPolicy()
test_case.identifier: checkForActivityOfNonexistentPolicy
test_case.invocations: of props apply create actorOf getContext build matchAny tell ref getSelf restart build matchAny create equals getTestActor getSender forward actorSelection getContext child path getSelf getContext forward getTestActor getContext actorOf checkForActivity tell getRef tell getRef tell getRef expectMsg expectNoMessage create
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void checkForActivityOfNonexistentPolicy()
focal_class.declarator: PERSISTENCE_ID_PREFIX = "policy:"
focal_class.modifier: public static final
focal_class.original_string: public static final String PERSISTENCE_ID_PREFIX = "policy:";
focal_class.type: String
focal_class.var_name: PERSISTENCE_ID_PREFIX
focal_class.declarator: JOURNAL_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-journal"
focal_class.modifier: static final
focal_class.original_string: static final String JOURNAL_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-journal";
focal_class.type: String
focal_class.var_name: JOURNAL_PLUGIN_ID
focal_class.declarator: SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-snapshots"
focal_class.modifier: static final
focal_class.original_string: static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-snapshots";
focal_class.type: String
focal_class.var_name: SNAPSHOT_PLUGIN_ID
focal_class.declarator: pubSubMediator
focal_class.modifier: private final
focal_class.original_string: private final ActorRef pubSubMediator;
focal_class.type: ActorRef
focal_class.var_name: pubSubMediator
focal_class.declarator: policyConfig
focal_class.modifier: private final
focal_class.original_string: private final PolicyConfig policyConfig;
focal_class.type: PolicyConfig
focal_class.var_name: policyConfig
focal_class.file: services/policies/persistence/src/main/java/org/eclipse/ditto/services/policies/persistence/actors/PolicyPersistenceActor.java
focal_class.identifier: PolicyPersistenceActor
focal_class.class_method_signature: PolicyPersistenceActor.PolicyPersistenceActor(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.full_signature:   PolicyPersistenceActor(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.identifier: PolicyPersistenceActor
focal_class.parameters: (final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.signature:  PolicyPersistenceActor(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.class_method_signature: PolicyPersistenceActor.props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.full_signature: public static Props props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.identifier: props
focal_class.modifiers: public static
focal_class.parameters: (final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.return: Props
focal_class.signature: Props props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_class.class_method_signature: PolicyPersistenceActor.getShardRegion(final ActorSystem system)
focal_class.full_signature: public static ActorRef getShardRegion(final ActorSystem system)
focal_class.identifier: getShardRegion
focal_class.modifiers: public static
focal_class.parameters: (final ActorSystem system)
focal_class.return: ActorRef
focal_class.signature: ActorRef getShardRegion(final ActorSystem system)
focal_class.class_method_signature: PolicyPersistenceActor.persistenceId()
focal_class.full_signature: @Override public String persistenceId()
focal_class.identifier: persistenceId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String persistenceId()
focal_class.class_method_signature: PolicyPersistenceActor.journalPluginId()
focal_class.full_signature: @Override public String journalPluginId()
focal_class.identifier: journalPluginId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String journalPluginId()
focal_class.class_method_signature: PolicyPersistenceActor.snapshotPluginId()
focal_class.full_signature: @Override public String snapshotPluginId()
focal_class.identifier: snapshotPluginId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String snapshotPluginId()
focal_class.class_method_signature: PolicyPersistenceActor.getEventClass()
focal_class.full_signature: @Override protected Class<PolicyEvent> getEventClass()
focal_class.identifier: getEventClass
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: Class<PolicyEvent>
focal_class.signature: Class<PolicyEvent> getEventClass()
focal_class.class_method_signature: PolicyPersistenceActor.getStrategyContext()
focal_class.full_signature: @Override protected CommandStrategy.Context<PolicyId> getStrategyContext()
focal_class.identifier: getStrategyContext
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: CommandStrategy.Context<PolicyId>
focal_class.signature: CommandStrategy.Context<PolicyId> getStrategyContext()
focal_class.class_method_signature: PolicyPersistenceActor.getCreatedStrategy()
focal_class.full_signature: @Override protected PolicyCommandStrategies getCreatedStrategy()
focal_class.identifier: getCreatedStrategy
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: PolicyCommandStrategies
focal_class.signature: PolicyCommandStrategies getCreatedStrategy()
focal_class.class_method_signature: PolicyPersistenceActor.getDeletedStrategy()
focal_class.full_signature: @Override protected CommandStrategy<? extends Command, Policy, PolicyId, Result<PolicyEvent>> getDeletedStrategy()
focal_class.identifier: getDeletedStrategy
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: CommandStrategy<? extends Command, Policy, PolicyId, Result<PolicyEvent>>
focal_class.signature: CommandStrategy<? extends Command, Policy, PolicyId, Result<PolicyEvent>> getDeletedStrategy()
focal_class.class_method_signature: PolicyPersistenceActor.getEventStrategy()
focal_class.full_signature: @Override protected EventStrategy<PolicyEvent, Policy> getEventStrategy()
focal_class.identifier: getEventStrategy
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: EventStrategy<PolicyEvent, Policy>
focal_class.signature: EventStrategy<PolicyEvent, Policy> getEventStrategy()
focal_class.class_method_signature: PolicyPersistenceActor.getActivityCheckConfig()
focal_class.full_signature: @Override protected ActivityCheckConfig getActivityCheckConfig()
focal_class.identifier: getActivityCheckConfig
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: ActivityCheckConfig
focal_class.signature: ActivityCheckConfig getActivityCheckConfig()
focal_class.class_method_signature: PolicyPersistenceActor.getSnapshotConfig()
focal_class.full_signature: @Override protected SnapshotConfig getSnapshotConfig()
focal_class.identifier: getSnapshotConfig
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: SnapshotConfig
focal_class.signature: SnapshotConfig getSnapshotConfig()
focal_class.class_method_signature: PolicyPersistenceActor.entityExistsAsDeleted()
focal_class.full_signature: @Override protected boolean entityExistsAsDeleted()
focal_class.identifier: entityExistsAsDeleted
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean entityExistsAsDeleted()
focal_class.class_method_signature: PolicyPersistenceActor.newNotAccessibleExceptionBuilder()
focal_class.full_signature: @Override protected DittoRuntimeExceptionBuilder newNotAccessibleExceptionBuilder()
focal_class.identifier: newNotAccessibleExceptionBuilder
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: DittoRuntimeExceptionBuilder
focal_class.signature: DittoRuntimeExceptionBuilder newNotAccessibleExceptionBuilder()
focal_class.class_method_signature: PolicyPersistenceActor.publishEvent(final PolicyEvent event)
focal_class.full_signature: @Override protected void publishEvent(final PolicyEvent event)
focal_class.identifier: publishEvent
focal_class.modifiers: @Override protected
focal_class.parameters: (final PolicyEvent event)
focal_class.return: void
focal_class.signature: void publishEvent(final PolicyEvent event)
focal_class.class_method_signature: PolicyPersistenceActor.getEntitySchemaVersion(final Policy entity)
focal_class.full_signature: @Override protected JsonSchemaVersion getEntitySchemaVersion(final Policy entity)
focal_class.identifier: getEntitySchemaVersion
focal_class.modifiers: @Override protected
focal_class.parameters: (final Policy entity)
focal_class.return: JsonSchemaVersion
focal_class.signature: JsonSchemaVersion getEntitySchemaVersion(final Policy entity)
focal_class.superclass: extends AbstractShardedPersistenceActor<Command, Policy, PolicyId, PolicyId, PolicyEvent>
focal_method.body: public static Props props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator) {
  
          return Props.create(PolicyPersistenceActor.class, policyId, snapshotAdapter, pubSubMediator);
      }
focal_method.class_method_signature: PolicyPersistenceActor.props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_method.full_signature: public static Props props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_method.identifier: props
focal_method.invocations: create
focal_method.modifiers: public static
focal_method.parameters: (final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)
focal_method.return: Props
focal_method.signature: Props props(final PolicyId policyId,
              final SnapshotAdapter<Policy> snapshotAdapter,
              final ActorRef pubSubMediator)