@Test
public void testBindExchange() {

    eventBinder.bind(TestEventOne.class).toExchange(TestSetup.TEST_EXCHANGE_ONE);
    eventBinder.bind(TestEventTwo.class).toExchange(TestSetup.TEST_EXCHANGE_TWO)
            .withRoutingKey(TestSetup.TEST_ROUTING_KEY_TWO)
            .withPersistentMessages()
            .withPublisherTransactions()
            .withImmediateDelivery();
    eventBinder.bind(TestEventThree.class).toExchange(TestSetup.TEST_EXCHANGE_THREE)
            .withRoutingKey(TestSetup.TEST_ROUTING_KEY_THREE)
            .withPublisherConfirms()
            .withMandatoryDelivery();
    eventBinder.processExchangeBindings();
    Map<Class<?>, EventPublisher.PublisherConfiguration> configurations =
            eventBinder.eventPublisher.publisherConfigurations;
    EventPublisher.PublisherConfiguration config = configurations.get(TestEventOne.class);
    Assert.assertEquals(TestSetup.TEST_EXCHANGE_ONE, config.exchange);
    Assert.assertNull(config.routingKey);
    Assert.assertEquals(PublisherReliability.NONE, config.reliability);
    Assert.assertEquals(DeliveryOptions.NONE, config.deliveryOptions);
    config = configurations.get(TestEventTwo.class);
    Assert.assertEquals(TestSetup.TEST_EXCHANGE_TWO, config.exchange);
    Assert.assertEquals(TestSetup.TEST_ROUTING_KEY_TWO, config.routingKey);
    Assert.assertEquals(PublisherReliability.TRANSACTIONAL, config.reliability);
    Assert.assertEquals(DeliveryOptions.IMMEDIATE, config.deliveryOptions);
    config = configurations.get(TestEventThree.class);
    Assert.assertEquals(TestSetup.TEST_EXCHANGE_THREE, config.exchange);
    Assert.assertEquals(TestSetup.TEST_ROUTING_KEY_THREE, config.routingKey);
    Assert.assertEquals(PublisherReliability.CONFIRMED, config.reliability);
    Assert.assertEquals(DeliveryOptions.MANDATORY, config.deliveryOptions);
}