test_class.file: server/src/test/java/io/spine/server/event/model/RejectionDispatchKeysTest.java
test_class.identifier: RejectionDispatchKeysTest
test_class.superclass: extends UtilityClassTest<RejectionDispatchKeys>
test_case.body: @SuppressWarnings("ResultOfMethodCallIgnored")
      @Test
      @DisplayName("create a valid key")
      void createValidKey() {
          assertDoesNotThrow(() -> {
              Method method = ModelTests.getMethod(RejectionSubscriber.class, "rejectionWithCommand");
              RejectionDispatchKeys.of(EventClass.from(SigCannotCreateProject.class), method);
          });
          assertDoesNotThrow(() -> {
              Method method = ModelTests.getMethod(RejectionSubscriber.class,
                                                   "rejectionWithCommandAndCtx");
              RejectionDispatchKeys.of(EventClass.from(SigCannotCreateProject.class), method);
          });
      }
test_case.class_method_signature: RejectionDispatchKeysTest.createValidKey()
test_case.full_signature: @SuppressWarnings("ResultOfMethodCallIgnored") @Test @DisplayName("create a valid key") void createValidKey()
test_case.identifier: createValidKey
test_case.invocations: assertDoesNotThrow getMethod of from assertDoesNotThrow getMethod of from
test_case.modifiers: @SuppressWarnings("ResultOfMethodCallIgnored") @Test @DisplayName("create a valid key")
test_case.parameters: ()
test_case.return: void
test_case.signature: void createValidKey()
focal_class.file: server/src/main/java/io/spine/server/event/model/RejectionDispatchKeys.java
focal_class.identifier: RejectionDispatchKeys
focal_class.class_method_signature: RejectionDispatchKeys.RejectionDispatchKeys()
focal_class.full_signature: private  RejectionDispatchKeys()
focal_class.identifier: RejectionDispatchKeys
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  RejectionDispatchKeys()
focal_class.class_method_signature: RejectionDispatchKeys.of(EventClass eventClass, Method rawMethod)
focal_class.full_signature: static DispatchKey of(EventClass eventClass, Method rawMethod)
focal_class.identifier: of
focal_class.modifiers: static
focal_class.parameters: (EventClass eventClass, Method rawMethod)
focal_class.return: DispatchKey
focal_class.signature: DispatchKey of(EventClass eventClass, Method rawMethod)
focal_method.body: static DispatchKey of(EventClass eventClass, Method rawMethod) {
          checkNotNull(eventClass);
          checkNotNull(rawMethod);
          Class<?>[] parameters = rawMethod.getParameterTypes();
          String methodName = rawMethod.getName();
          checkArgument(parameters.length >= 2,
                        "The method `%s` should have at least 2 parameters, but has `%s`.",
                        methodName,
                        parameters.length);
          Class<?> secondParameter = parameters[1];
          checkArgument(CommandMessage.class.isAssignableFrom(secondParameter),
                        "The method `%s` should have the second parameter assignable from `CommandMessage`, but has `%s`.",
                        methodName,
                        secondParameter);
          @SuppressWarnings("unchecked") // checked above
          Class<? extends CommandMessage> commandMessageClass =
                  (Class<? extends CommandMessage>) secondParameter;
          CommandClass commandClass = CommandClass.from(commandMessageClass);
          return new DispatchKey(eventClass.value(), null, commandClass.value());
      }
focal_method.class_method_signature: RejectionDispatchKeys.of(EventClass eventClass, Method rawMethod)
focal_method.full_signature: static DispatchKey of(EventClass eventClass, Method rawMethod)
focal_method.identifier: of
focal_method.invocations: checkNotNull checkNotNull getParameterTypes getName checkArgument checkArgument isAssignableFrom from value value
focal_method.modifiers: static
focal_method.parameters: (EventClass eventClass, Method rawMethod)
focal_method.return: DispatchKey
focal_method.signature: DispatchKey of(EventClass eventClass, Method rawMethod)