AmqpMessageDispatcherService extends BaseAmqpService { @EventListener(classes = TargetAttributesRequestedEvent.class) protected void targetTriggerUpdateAttributes(final TargetAttributesRequestedEvent updateAttributesEvent) { sendUpdateAttributesMessageToTarget(updateAttributesEvent.getTenant(), updateAttributesEvent.getControllerId(), updateAttributesEvent.getTargetAddress()); } protected  AmqpMessageDispatcherService(final RabbitTemplate rabbitTemplate,
            final AmqpMessageSenderService amqpSenderService, final ArtifactUrlHandler artifactUrlHandler,
            final SystemSecurityContext systemSecurityContext, final SystemManagement systemManagement,
            final TargetManagement targetManagement, final ServiceMatcher serviceMatcher,
            final DistributionSetManagement distributionSetManagement,
            final SoftwareModuleManagement softwareModuleManagement, final DeploymentManagement deploymentManagement);   }
@Test @Description("Verifies that sending update controller attributes event works.") public void sendUpdateAttributesRequest() { final String amqpUri = "amqp: final TargetAttributesRequestedEvent targetAttributesRequestedEvent = new TargetAttributesRequestedEvent(TENANT, 1L, CONTROLLER_ID, amqpUri, Target.class.getName(), serviceMatcher.getServiceId()); amqpMessageDispatcherService.targetTriggerUpdateAttributes(targetAttributesRequestedEvent); final Message sendMessage = createArgumentCapture(URI.create(amqpUri)); assertUpdateAttributesMessage(sendMessage); }