@@ -0,0 +1,3157 @@
+package forklift.connectors;%0A%0Aimport forklift.decorators.Queue;%0Aimport forklift.decorators.Queues;%0Aimport forklift.decorators.Topic;%0Aimport forklift.source.QueueSource;%0Aimport forklift.source.TopicSource;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class ConsumerSourceTest %7B%0A    @Test%0A    public void testSameSourceEqual() %7B%0A        Assert.assertEquals(new ConsumerSource(new QueueSource(%22test%22)),%0A                            new ConsumerSource(new QueueSource(%22test%22)));%0A    %7D%0A%0A    @Test%0A    public void testDifferentSourceNotEqual() %7B%0A        Assert.assertNotEquals(new ConsumerSource(new QueueSource(%22test%22)),%0A                               new ConsumerSource(new TopicSource(%22test%22)));%0A    %7D%0A%0A    @Test%0A    public void testCreationFromNoSourceConsumer() %7B%0A        final List%3CConsumerSource%3E sources = ConsumerSource.getConsumerSources(NoSourceConsumer.class);%0A        final List%3CConsumerSource%3E expectedSources = Arrays.asList();%0A%0A        Assert.assertEquals(expectedSources, sources);%0A    %7D%0A%0A    @Test%0A    public void testCreationFromSingleSourceConsumer() %7B%0A        final List%3CConsumerSource%3E sources = ConsumerSource.getConsumerSources(SingleSourceConsumer.class);%0A        final List%3CConsumerSource%3E expectedSources = Arrays.asList(new ConsumerSource(new QueueSource(%22b%22)));%0A%0A        Assert.assertEquals(expectedSources, sources);%0A    %7D%0A%0A    @Test%0A    public void testCreationFromRepeatedSourceConsumer() %7B%0A        final List%3CConsumerSource%3E sources = ConsumerSource.getConsumerSources(RepeatedSourceConsumer.class);%0A        final List%3CConsumerSource%3E expectedSources = Arrays.asList(new ConsumerSource(new QueueSource(%22a%22)),%0A                                                                   new ConsumerSource(new QueueSource(%22b%22)));%0A%0A        Assert.assertEquals(expectedSources, sources);%0A    %7D%0A%0A    @Test%0A    public void testCreationFromManualRepeatedSourceConsumer() %7B%0A        final List%3CConsumerSource%3E sources = ConsumerSource.getConsumerSources(ManualRepeatedSourceConsumer.class);%0A        final List%3CConsumerSource%3E expectedSources = Arrays.asList(new ConsumerSource(new QueueSource(%22a%22)),%0A                                                                   new ConsumerSource(new QueueSource(%22b%22)));%0A%0A        Assert.assertEquals(expectedSources, sources);%0A    %7D%0A%0A    @Test%0A    public void testCreationFromMixedSourceConsumer() %7B%0A        final List%3CConsumerSource%3E sources = ConsumerSource.getConsumerSources(MixedSourceConsumer.class);%0A        final List%3CConsumerSource%3E expectedSources = Arrays.asList(new ConsumerSource(new QueueSource(%22test-queue%22)),%0A                                                                   new ConsumerSource(new TopicSource(%22test-topic%22)));%0A%0A        Assert.assertEquals(expectedSources, sources);%0A    %7D%0A%0A    class NoSourceConsumer %7B%7D%0A%0A    @Queue(%22b%22)%0A    class SingleSourceConsumer %7B%7D%0A%0A    @Queue(%22a%22)%0A    @Queue(%22b%22)%0A    class RepeatedSourceConsumer %7B%7D%0A%0A    @Queues(%7B%0A        @Queue(%22a%22),%0A        @Queue(%22b%22)%0A    %7D)%0A    class ManualRepeatedSourceConsumer %7B%7D%0A%0A    @Queue(%22test-queue%22)%0A    @Topic(%22test-topic%22)%0A    class MixedSourceConsumer %7B%7D%0A%0A%7D%0A

Test reading ConsumerSources off of classes