### Question:
AmqpProducer { public static void sendNewApplicationMessage(Application application) { ApplicationManagerMessage amMessage = new ApplicationManagerMessage(); amMessage.setApplicationId(application.getName()); AmqpProducer.sendMessage(APPLLICATION_PATH + "." + application.getName() + "." + "ADDED", amMessage, true); }  static void sendMessage(String topic, ApplicationManagerMessage message, boolean toLog); static void sendNewApplicationMessage(Application application); static void sendDeploymentSubmittedMessage(Application application); static void sendDeploymentNegotiatingMessage(String applicationName, Deployment deployment); static void sendDeploymentNegotiatedMessage(String applicationName, Deployment deployment); static void sendDeploymentContextualizingMessage(String applicationName, Deployment deployment); static void sendDeploymentContextualizedMessage(String applicationName, Deployment deployment); static void sendDeploymentDeployingMessage(String applicationName, Deployment deployment); static void sendDeploymentDeployedMessage(String applicationName, Deployment deployment); static void sendDeploymentDeletedMessage(String applicationName, Deployment deployment); static void sendDeploymentErrorMessage(String applicationName, Deployment deployment); static void sendVMDeployingMessage(String applicationName, Deployment deployment, VM vm); static void sendVMDeployedMessage(String applicationName, Deployment deployment, VM vm); static void sendVMDeletedMessage(String applicationName, Deployment deployment, VM vm); static void sendDeploymentRenegotiatingMessage(String applicationName, Deployment deployment); static void sendDeploymentRenegotiatedMessage(String applicationName, Deployment deployment); static final String APPLLICATION_PATH; static final String DEPLOYMENT_PATH; static final String VM_PATH; static final String DELETED; }### Answer:
@Test public void sendNewApplicationMessageTest() throws Exception { AmqpMessageReceiver receiver = new AmqpMessageReceiver(Configuration.amqpAddress, Configuration.amqpUsername, Configuration.amqpPassword, "APPLICATION.pepito.ADDED", true); AmqpBasicListener listener = new AmqpBasicListener(); receiver.setMessageConsumer(listener); Application application = new Application(); application.setName("pepito"); AmqpProducer.sendNewApplicationMessage(application); Thread.sleep(700l); assertEquals("APPLICATION.pepito.ADDED", listener.getDestination()); ApplicationManagerMessage amMessageReceived = ModelConverter.jsonToApplicationManagerMessage(listener.getMessage()); assertEquals("pepito", amMessageReceived.getApplicationId()); receiver.close(); }