test_class.declarator: requestFactory =
              new TestActorRequestFactory(SubscriptionServiceTest.class)
test_class.modifier: private final
test_class.original_string: private final TestActorRequestFactory requestFactory =
              new TestActorRequestFactory(SubscriptionServiceTest.class);
test_class.type: TestActorRequestFactory
test_class.var_name: requestFactory
test_class.declarator: context
test_class.modifier: private
test_class.original_string: private BoundedContext context;
test_class.type: BoundedContext
test_class.var_name: context
test_class.declarator: subscriptionService
test_class.modifier: private
test_class.original_string: private SubscriptionService subscriptionService;
test_class.type: SubscriptionService
test_class.var_name: subscriptionService
test_class.declarator: observer
test_class.modifier: private
test_class.original_string: private MemoizingObserver<Subscription> observer;
test_class.type: MemoizingObserver<Subscription>
test_class.var_name: observer
test_class.declarator: activationObserver
test_class.modifier: private
test_class.original_string: private MemoizingObserver<SubscriptionUpdate> activationObserver;
test_class.type: MemoizingObserver<SubscriptionUpdate>
test_class.var_name: activationObserver
test_class.declarator: cancellationObserver
test_class.modifier: private
test_class.original_string: private MemoizingObserver<Response> cancellationObserver;
test_class.type: MemoizingObserver<Response>
test_class.var_name: cancellationObserver
test_class.file: server/src/test/java/io/spine/server/SubscriptionServiceTest.java
test_class.identifier: SubscriptionServiceTest
test_case.body: @Test
      @MuteLogging
      @DisplayName("receive IAE in error callback when activating non-existent subscription")
      void failOnActivatingNonExistent() {
          Subscription invalidSubscription = invalidSubscription();
          subscriptionService.activate(invalidSubscription, activationObserver);
          assertThat(activationObserver.responses())
                  .isEmpty();
          assertThat(activationObserver.isCompleted())
                  .isFalse();
          assertThat(activationObserver.getError())
                  .isInstanceOf(InvalidSubscriptionException.class);
      }
test_case.class_method_signature: SubscriptionServiceTest.failOnActivatingNonExistent()
test_case.full_signature: @Test @MuteLogging @DisplayName("receive IAE in error callback when activating non-existent subscription") void failOnActivatingNonExistent()
test_case.identifier: failOnActivatingNonExistent
test_case.invocations: invalidSubscription activate isEmpty assertThat responses isFalse assertThat isCompleted isInstanceOf assertThat getError
test_case.modifiers: @Test @MuteLogging @DisplayName("receive IAE in error callback when activating non-existent subscription")
test_case.parameters: ()
test_case.return: void
test_case.signature: void failOnActivatingNonExistent()
focal_class.declarator: LIST_JOINER = Joiner.on(", ")
focal_class.modifier: private static final
focal_class.original_string: private static final Joiner LIST_JOINER = Joiner.on(", ");
focal_class.type: Joiner
focal_class.var_name: LIST_JOINER
focal_class.declarator: typeToContextMap
focal_class.modifier: private final
focal_class.original_string: private final ImmutableMap<TypeUrl, BoundedContext> typeToContextMap;
focal_class.type: ImmutableMap<TypeUrl, BoundedContext>
focal_class.var_name: typeToContextMap
focal_class.file: server/src/main/java/io/spine/server/SubscriptionService.java
focal_class.identifier: SubscriptionService
focal_class.interfaces: implements Logging
focal_class.class_method_signature: SubscriptionService.SubscriptionService(ImmutableMap<TypeUrl, BoundedContext> map)
focal_class.full_signature: private  SubscriptionService(ImmutableMap<TypeUrl, BoundedContext> map)
focal_class.identifier: SubscriptionService
focal_class.modifiers: private
focal_class.parameters: (ImmutableMap<TypeUrl, BoundedContext> map)
focal_class.signature:  SubscriptionService(ImmutableMap<TypeUrl, BoundedContext> map)
focal_class.class_method_signature: SubscriptionService.newBuilder()
focal_class.full_signature: public static Builder newBuilder()
focal_class.identifier: newBuilder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Builder
focal_class.signature: Builder newBuilder()
focal_class.class_method_signature: SubscriptionService.subscribe(Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.full_signature: @Override public void subscribe(Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.identifier: subscribe
focal_class.modifiers: @Override public
focal_class.parameters: (Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.return: void
focal_class.signature: void subscribe(Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.class_method_signature: SubscriptionService.subscribeTo(Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.full_signature: private void subscribeTo(Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.identifier: subscribeTo
focal_class.modifiers: private
focal_class.parameters: (Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.return: void
focal_class.signature: void subscribeTo(Topic topic, StreamObserver<Subscription> responseObserver)
focal_class.class_method_signature: SubscriptionService.activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_class.full_signature: @Override public void activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_class.identifier: activate
focal_class.modifiers: @Override public
focal_class.parameters: (Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_class.return: void
focal_class.signature: void activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_class.class_method_signature: SubscriptionService.cancel(Subscription subscription, StreamObserver<Response> responseObserver)
focal_class.full_signature: @Override public void cancel(Subscription subscription, StreamObserver<Response> responseObserver)
focal_class.identifier: cancel
focal_class.modifiers: @Override public
focal_class.parameters: (Subscription subscription, StreamObserver<Response> responseObserver)
focal_class.return: void
focal_class.signature: void cancel(Subscription subscription, StreamObserver<Response> responseObserver)
focal_class.class_method_signature: SubscriptionService.findContextOf(Subscription subscription)
focal_class.full_signature: private Optional<BoundedContext> findContextOf(Subscription subscription)
focal_class.identifier: findContextOf
focal_class.modifiers: private
focal_class.parameters: (Subscription subscription)
focal_class.return: Optional<BoundedContext>
focal_class.signature: Optional<BoundedContext> findContextOf(Subscription subscription)
focal_class.class_method_signature: SubscriptionService.findContextOf(Target target)
focal_class.full_signature: private Optional<BoundedContext> findContextOf(Target target)
focal_class.identifier: findContextOf
focal_class.modifiers: private
focal_class.parameters: (Target target)
focal_class.return: Optional<BoundedContext>
focal_class.signature: Optional<BoundedContext> findContextOf(Target target)
focal_class.superclass: extends SubscriptionServiceGrpc.SubscriptionServiceImplBase
focal_method.body: @Override
      public void activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer) {
          _debug().log("Activating the subscription: `%s`.", subscription);
          try {
              SubscriptionCallback callback = forwardingTo(observer);
              StreamObserver<Response> responseObserver = forwardErrorsOnly(observer);
              Optional<BoundedContext> foundContext = findContextOf(subscription);
              if (foundContext.isPresent()) {
                  Stand targetStand = foundContext.get().stand();
                  targetStand.activate(subscription, callback, responseObserver);
              } else {
                  for (BoundedContext context : typeToContextMap.values()) {
                      Stand stand = context.stand();
                      stand.activate(subscription, callback, responseObserver);
                  }
              }
          } catch (@SuppressWarnings("OverlyBroadCatchBlock") Exception e) {
              _error().withCause(e)
                      .log("Error activating the subscription.");
              observer.onError(e);
          }
      }
focal_method.class_method_signature: SubscriptionService.activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_method.full_signature: @Override public void activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_method.identifier: activate
focal_method.invocations: log _debug forwardingTo forwardErrorsOnly findContextOf isPresent stand get activate values stand activate log withCause _error onError
focal_method.modifiers: @Override public
focal_method.parameters: (Subscription subscription, StreamObserver<SubscriptionUpdate> observer)
focal_method.return: void
focal_method.signature: void activate(Subscription subscription, StreamObserver<SubscriptionUpdate> observer)