test_class.declarator: TARGET_ID = "target-ID"
test_class.modifier: private static final
test_class.original_string: private static final String TARGET_ID = "target-ID";
test_class.type: String
test_class.var_name: TARGET_ID
test_class.declarator: EMPTY_PRJ = Project.getDefaultInstance()
test_class.modifier: private static final
test_class.original_string: private static final Project EMPTY_PRJ = Project.getDefaultInstance();
test_class.type: Project
test_class.var_name: EMPTY_PRJ
test_class.file: server/src/test/java/io/spine/server/stand/SubscriptionRecordTest.java
test_class.identifier: SubscriptionRecordTest
test_case.body: @Test
      @DisplayName("detect that the entity state stopped matching the subscription criteria")
      void tellNoLongerMatching() {
          ProjectId targetId = projectId(TARGET_ID);
          String targetName = "previously-matching-project";
  
          SubscriptionRecord record = projectRecord(targetId,
                                                    Filters.eq("name", targetName));
  
          Project matching = projectWithName(targetName);
          Project nonMatching = projectWithName("not-matching-anymore");
  
          EventEnvelope envelope = stateChangedEnvelope(targetId, matching, nonMatching);
          Optional<SubscriptionUpdate> maybeUpdate = record.detectUpdate(envelope);
          assertThat(maybeUpdate).isPresent();
  
          EntityStateUpdate entityUpdate = firstEntityUpdate(maybeUpdate);
          assertTrue(entityUpdate.getNoLongerMatching());
      }
test_case.class_method_signature: SubscriptionRecordTest.tellNoLongerMatching()
test_case.full_signature: @Test @DisplayName("detect that the entity state stopped matching the subscription criteria") void tellNoLongerMatching()
test_case.identifier: tellNoLongerMatching
test_case.invocations: projectId projectRecord eq projectWithName projectWithName stateChangedEnvelope detectUpdate isPresent assertThat firstEntityUpdate assertTrue getNoLongerMatching
test_case.modifiers: @Test @DisplayName("detect that the entity state stopped matching the subscription criteria")
test_case.parameters: ()
test_case.return: void
test_case.signature: void tellNoLongerMatching()
focal_class.declarator: ENTITY_STATE_CHANGED = TypeUrl.of(EntityStateChanged.class)
focal_class.modifier: private static final
focal_class.original_string: private static final TypeUrl ENTITY_STATE_CHANGED = TypeUrl.of(EntityStateChanged.class);
focal_class.type: TypeUrl
focal_class.var_name: ENTITY_STATE_CHANGED
focal_class.declarator: subscription
focal_class.modifier: private final
focal_class.original_string: private final Subscription subscription;
focal_class.type: Subscription
focal_class.var_name: subscription
focal_class.declarator: type
focal_class.modifier: private final
focal_class.original_string: private final TypeUrl type;
focal_class.type: TypeUrl
focal_class.var_name: type
focal_class.declarator: handler
focal_class.modifier: private final
focal_class.original_string: private final UpdateHandler handler;
focal_class.type: UpdateHandler
focal_class.var_name: handler
focal_class.file: server/src/main/java/io/spine/server/stand/SubscriptionRecord.java
focal_class.identifier: SubscriptionRecord
focal_class.class_method_signature: SubscriptionRecord.SubscriptionRecord(Subscription s, TypeUrl targetType, UpdateHandler handler)
focal_class.full_signature: private  SubscriptionRecord(Subscription s, TypeUrl targetType, UpdateHandler handler)
focal_class.identifier: SubscriptionRecord
focal_class.modifiers: private
focal_class.parameters: (Subscription s, TypeUrl targetType, UpdateHandler handler)
focal_class.signature:  SubscriptionRecord(Subscription s, TypeUrl targetType, UpdateHandler handler)
focal_class.class_method_signature: SubscriptionRecord.of(Subscription subscription)
focal_class.full_signature: static SubscriptionRecord of(Subscription subscription)
focal_class.identifier: of
focal_class.modifiers: static
focal_class.parameters: (Subscription subscription)
focal_class.return: SubscriptionRecord
focal_class.signature: SubscriptionRecord of(Subscription subscription)
focal_class.class_method_signature: SubscriptionRecord.createEventRecord(Subscription subscription)
focal_class.full_signature: private static SubscriptionRecord createEventRecord(Subscription subscription)
focal_class.identifier: createEventRecord
focal_class.modifiers: private static
focal_class.parameters: (Subscription subscription)
focal_class.return: SubscriptionRecord
focal_class.signature: SubscriptionRecord createEventRecord(Subscription subscription)
focal_class.class_method_signature: SubscriptionRecord.createEntityRecord(Subscription subscription)
focal_class.full_signature: private static SubscriptionRecord createEntityRecord(Subscription subscription)
focal_class.identifier: createEntityRecord
focal_class.modifiers: private static
focal_class.parameters: (Subscription subscription)
focal_class.return: SubscriptionRecord
focal_class.signature: SubscriptionRecord createEntityRecord(Subscription subscription)
focal_class.class_method_signature: SubscriptionRecord.activate(SubscriptionCallback callback)
focal_class.full_signature:  void activate(SubscriptionCallback callback)
focal_class.identifier: activate
focal_class.parameters: (SubscriptionCallback callback)
focal_class.return: void
focal_class.signature: void activate(SubscriptionCallback callback)
focal_class.class_method_signature: SubscriptionRecord.update(EventEnvelope event)
focal_class.full_signature:  void update(EventEnvelope event)
focal_class.identifier: update
focal_class.parameters: (EventEnvelope event)
focal_class.return: void
focal_class.signature: void update(EventEnvelope event)
focal_class.class_method_signature: SubscriptionRecord.isActive()
focal_class.full_signature:  boolean isActive()
focal_class.identifier: isActive
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isActive()
focal_class.class_method_signature: SubscriptionRecord.detectUpdate(EventEnvelope event)
focal_class.full_signature: @VisibleForTesting Optional<SubscriptionUpdate> detectUpdate(EventEnvelope event)
focal_class.identifier: detectUpdate
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (EventEnvelope event)
focal_class.return: Optional<SubscriptionUpdate>
focal_class.signature: Optional<SubscriptionUpdate> detectUpdate(EventEnvelope event)
focal_class.class_method_signature: SubscriptionRecord.targetType()
focal_class.full_signature:  TypeUrl targetType()
focal_class.identifier: targetType
focal_class.parameters: ()
focal_class.return: TypeUrl
focal_class.signature: TypeUrl targetType()
focal_class.class_method_signature: SubscriptionRecord.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: SubscriptionRecord.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_method.body: @VisibleForTesting
      Optional<SubscriptionUpdate> detectUpdate(EventEnvelope event) {
          return handler.detectUpdate(event);
      }
focal_method.class_method_signature: SubscriptionRecord.detectUpdate(EventEnvelope event)
focal_method.full_signature: @VisibleForTesting Optional<SubscriptionUpdate> detectUpdate(EventEnvelope event)
focal_method.identifier: detectUpdate
focal_method.invocations: detectUpdate
focal_method.modifiers: @VisibleForTesting
focal_method.parameters: (EventEnvelope event)
focal_method.return: Optional<SubscriptionUpdate>
focal_method.signature: Optional<SubscriptionUpdate> detectUpdate(EventEnvelope event)