test_class.declarator: ORGANIZATION_ID = randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID ORGANIZATION_ID = randomUUID();
test_class.type: UUID
test_class.var_name: ORGANIZATION_ID
test_class.declarator: ORGANIZATION = new Organization()
test_class.modifier: private static final
test_class.original_string: private static final Organization ORGANIZATION = new Organization();
test_class.type: Organization
test_class.var_name: ORGANIZATION
test_class.declarator: unitOfWork
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UnitOfWork<? extends CommandMessage<?>> unitOfWork;
test_class.type: UnitOfWork<? extends CommandMessage<?>>
test_class.var_name: unitOfWork
test_class.declarator: commandMessage
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CommandMessage<?> commandMessage;
test_class.type: CommandMessage<?>
test_class.var_name: commandMessage
test_class.declarator: interceptorChain
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private InterceptorChain interceptorChain;
test_class.type: InterceptorChain
test_class.var_name: interceptorChain
test_class.declarator: usersReadService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UsersReadService usersReadService;
test_class.type: UsersReadService
test_class.var_name: usersReadService
test_class.declarator: javaBeanValidator
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Validator javaBeanValidator;
test_class.type: Validator
test_class.var_name: javaBeanValidator
test_class.declarator: organizationsReadService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private OrganizationsReadService organizationsReadService;
test_class.type: OrganizationsReadService
test_class.var_name: organizationsReadService
test_class.declarator: emailAddressValidator
test_class.modifier: private
test_class.original_string: private EmailAddressValidator emailAddressValidator;
test_class.type: EmailAddressValidator
test_class.var_name: emailAddressValidator
test_class.declarator: usersUniqueEmailValidator
test_class.modifier: private
test_class.original_string: private UsersUniqueEmailValidator usersUniqueEmailValidator;
test_class.type: UsersUniqueEmailValidator
test_class.var_name: usersUniqueEmailValidator
test_class.declarator: organizationStatusValidator
test_class.modifier: private
test_class.original_string: private OrganizationStatusValidator organizationStatusValidator;
test_class.type: OrganizationStatusValidator
test_class.var_name: organizationStatusValidator
test_class.declarator: commandValidatingMessageHandlerInterceptor
test_class.modifier: private
test_class.original_string: private CommandValidatingMessageHandlerInterceptor commandValidatingMessageHandlerInterceptor;
test_class.type: CommandValidatingMessageHandlerInterceptor
test_class.var_name: commandValidatingMessageHandlerInterceptor
test_class.file: axon-support/src/test/java/engineering/everest/lhotse/axon/CommandValidatingMessageHandlerInterceptorTest.java
test_class.identifier: CommandValidatingMessageHandlerInterceptorTest
test_case.body: @Test
      void willValidateCommandWithMultipleInterfaces() throws Exception {
          CreateUserCommand createUserCommand = mock(CreateUserCommand.class);
          when(createUserCommand.getOrganizationId()).thenReturn(ORGANIZATION_ID);
          Mockito.<Class<?>>when(commandMessage.getPayloadType()).thenReturn(CreateUserCommand.class);
          Mockito.<Object>when(commandMessage.getPayload()).thenReturn(createUserCommand);
          when(organizationsReadService.getById(ORGANIZATION_ID)).thenReturn(ORGANIZATION);
  
          commandValidatingMessageHandlerInterceptor.handle(unitOfWork, interceptorChain);
  
          verify(createUserCommand, times(2)).getEmailAddress();
          verify(createUserCommand, times(2)).getOrganizationId();
      }
test_case.class_method_signature: CommandValidatingMessageHandlerInterceptorTest.willValidateCommandWithMultipleInterfaces()
test_case.full_signature: @Test void willValidateCommandWithMultipleInterfaces()
test_case.identifier: willValidateCommandWithMultipleInterfaces
test_case.invocations: mock thenReturn when getOrganizationId thenReturn when getPayloadType thenReturn when getPayload thenReturn when getById handle getEmailAddress verify times getOrganizationId verify times
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void willValidateCommandWithMultipleInterfaces()
focal_class.declarator: validatorLookup
focal_class.modifier: private final
focal_class.original_string: private final Map<Class<?>, Validates<?>> validatorLookup;
focal_class.type: Map<Class<?>, Validates<?>>
focal_class.var_name: validatorLookup
focal_class.declarator: javaBeanValidator
focal_class.modifier: private final
focal_class.original_string: private final Validator javaBeanValidator;
focal_class.type: Validator
focal_class.var_name: javaBeanValidator
focal_class.file: axon-support/src/main/java/engineering/everest/lhotse/axon/CommandValidatingMessageHandlerInterceptor.java
focal_class.identifier: CommandValidatingMessageHandlerInterceptor
focal_class.interfaces: implements MessageHandlerInterceptor<CommandMessage<?>>
focal_class.class_method_signature: CommandValidatingMessageHandlerInterceptor.CommandValidatingMessageHandlerInterceptor(List<Validates> validators, Validator javaBeanValidator)
focal_class.full_signature: @Autowired public  CommandValidatingMessageHandlerInterceptor(List<Validates> validators, Validator javaBeanValidator)
focal_class.identifier: CommandValidatingMessageHandlerInterceptor
focal_class.modifiers: @Autowired public
focal_class.parameters: (List<Validates> validators, Validator javaBeanValidator)
focal_class.signature:  CommandValidatingMessageHandlerInterceptor(List<Validates> validators, Validator javaBeanValidator)
focal_class.class_method_signature: CommandValidatingMessageHandlerInterceptor.handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_class.full_signature: @Override public Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_class.identifier: handle
focal_class.modifiers: @Override public
focal_class.parameters: (UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_class.return: Object
focal_class.signature: Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_class.class_method_signature: CommandValidatingMessageHandlerInterceptor.validate(CommandMessage<?> commandMessage)
focal_class.full_signature: @SuppressWarnings("unchecked") private void validate(CommandMessage<?> commandMessage)
focal_class.identifier: validate
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (CommandMessage<?> commandMessage)
focal_class.return: void
focal_class.signature: void validate(CommandMessage<?> commandMessage)
focal_class.class_method_signature: CommandValidatingMessageHandlerInterceptor.getValidatableInterfaces(Class<?> commandClass)
focal_class.full_signature: private List<Class<?>> getValidatableInterfaces(Class<?> commandClass)
focal_class.identifier: getValidatableInterfaces
focal_class.modifiers: private
focal_class.parameters: (Class<?> commandClass)
focal_class.return: List<Class<?>>
focal_class.signature: List<Class<?>> getValidatableInterfaces(Class<?> commandClass)
focal_method.body: @Override
      public Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain) throws Exception {
          CommandMessage<?> message = unitOfWork.getMessage();
          if (ValidatableCommand.class.isAssignableFrom(message.getPayloadType())) {
              validate(message);
          }
          return interceptorChain.proceed();
      }
focal_method.class_method_signature: CommandValidatingMessageHandlerInterceptor.handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_method.full_signature: @Override public Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_method.identifier: handle
focal_method.invocations: getMessage isAssignableFrom getPayloadType validate proceed
focal_method.modifiers: @Override public
focal_method.parameters: (UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)
focal_method.return: Object
focal_method.signature: Object handle(UnitOfWork<? extends CommandMessage<?>> unitOfWork, InterceptorChain interceptorChain)