test_class.declarator: service
test_class.modifier: private
test_class.original_string: private CommandService service;
test_class.type: CommandService
test_class.var_name: service
test_class.declarator: boundedContexts = Sets.newHashSet()
test_class.modifier: private final
test_class.original_string: private final Set<BoundedContext> boundedContexts = Sets.newHashSet();
test_class.type: Set<BoundedContext>
test_class.var_name: boundedContexts
test_class.declarator: projectsContext
test_class.modifier: private
test_class.original_string: private BoundedContext projectsContext;
test_class.type: BoundedContext
test_class.var_name: projectsContext
test_class.declarator: customersContext
test_class.modifier: private
test_class.original_string: private BoundedContext customersContext;
test_class.type: BoundedContext
test_class.var_name: customersContext
test_class.declarator: responseObserver = memoizingObserver()
test_class.modifier: private final
test_class.original_string: private final MemoizingObserver<Ack> responseObserver = memoizingObserver();
test_class.type: MemoizingObserver<Ack>
test_class.var_name: responseObserver
test_class.file: server/src/test/java/io/spine/server/CommandServiceTest.java
test_class.identifier: CommandServiceTest
test_case.body: @Test
      @DisplayName("return error status if command is unsupported")
      @MuteLogging
      void returnCommandUnsupportedError() {
          TestActorRequestFactory factory = new TestActorRequestFactory(getClass());
  
          Command unsupportedCmd = factory.createCommand(CmdServDontHandle.getDefaultInstance());
  
          service.post(unsupportedCmd, responseObserver);
  
          assertTrue(responseObserver.isCompleted());
          Ack result = responseObserver.firstResponse();
          assertNotNull(result);
          assertTrue(isNotDefault(result));
          Status status = result.getStatus();
          assertEquals(ERROR, status.getStatusCase());
          Error error = status.getError();
          assertEquals(CommandValidationError.getDescriptor().getFullName(), error.getType());
      }
test_case.class_method_signature: CommandServiceTest.returnCommandUnsupportedError()
test_case.full_signature: @Test @DisplayName("return error status if command is unsupported") @MuteLogging void returnCommandUnsupportedError()
test_case.identifier: returnCommandUnsupportedError
test_case.invocations: getClass createCommand getDefaultInstance post assertTrue isCompleted firstResponse assertNotNull assertTrue isNotDefault getStatus assertEquals getStatusCase getError assertEquals getFullName getDescriptor getType
test_case.modifiers: @Test @DisplayName("return error status if command is unsupported") @MuteLogging
test_case.parameters: ()
test_case.return: void
test_case.signature: void returnCommandUnsupportedError()
focal_class.declarator: commandToContext
focal_class.modifier: private final
focal_class.original_string: private final ImmutableMap<CommandClass, BoundedContext> commandToContext;
focal_class.type: ImmutableMap<CommandClass, BoundedContext>
focal_class.var_name: commandToContext
focal_class.file: server/src/main/java/io/spine/server/CommandService.java
focal_class.identifier: CommandService
focal_class.interfaces: implements Logging
focal_class.class_method_signature: CommandService.CommandService(Map<CommandClass, BoundedContext> map)
focal_class.full_signature: private  CommandService(Map<CommandClass, BoundedContext> map)
focal_class.identifier: CommandService
focal_class.modifiers: private
focal_class.parameters: (Map<CommandClass, BoundedContext> map)
focal_class.signature:  CommandService(Map<CommandClass, BoundedContext> map)
focal_class.class_method_signature: CommandService.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: CommandService.post(Command request, StreamObserver<Ack> responseObserver)
focal_class.full_signature: @Override public void post(Command request, StreamObserver<Ack> responseObserver)
focal_class.identifier: post
focal_class.modifiers: @Override public
focal_class.parameters: (Command request, StreamObserver<Ack> responseObserver)
focal_class.return: void
focal_class.signature: void post(Command request, StreamObserver<Ack> responseObserver)
focal_class.class_method_signature: CommandService.handleUnsupported(Command command, StreamObserver<Ack> responseObserver)
focal_class.full_signature: private void handleUnsupported(Command command, StreamObserver<Ack> responseObserver)
focal_class.identifier: handleUnsupported
focal_class.modifiers: private
focal_class.parameters: (Command command, StreamObserver<Ack> responseObserver)
focal_class.return: void
focal_class.signature: void handleUnsupported(Command command, StreamObserver<Ack> responseObserver)
focal_class.superclass: extends CommandServiceGrpc.CommandServiceImplBase
focal_method.body: @Override
      public void post(Command request, StreamObserver<Ack> responseObserver) {
          CommandClass commandClass = CommandClass.of(request);
          BoundedContext context = commandToContext.get(commandClass);
          if (context == null) {
              handleUnsupported(request, responseObserver);
          } else {
              CommandBus commandBus = context.commandBus();
              commandBus.post(request, responseObserver);
          }
      }
focal_method.class_method_signature: CommandService.post(Command request, StreamObserver<Ack> responseObserver)
focal_method.full_signature: @Override public void post(Command request, StreamObserver<Ack> responseObserver)
focal_method.identifier: post
focal_method.invocations: of get handleUnsupported commandBus post
focal_method.modifiers: @Override public
focal_method.parameters: (Command request, StreamObserver<Ack> responseObserver)
focal_method.return: void
focal_method.signature: void post(Command request, StreamObserver<Ack> responseObserver)