@@ -0,0 +1,3173 @@
+package com.indeed.proctor.consumer;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport com.google.common.collect.Lists;%0Aimport com.google.common.collect.Sets;%0Aimport com.indeed.proctor.common.ProctorResult;%0Aimport com.indeed.proctor.common.model.Allocation;%0Aimport com.indeed.proctor.common.model.ConsumableTestDefinition;%0Aimport com.indeed.proctor.common.model.Range;%0Aimport com.indeed.proctor.common.model.TestBucket;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class TestAbstractGroups %7B%0A    static class TestGroups extends AbstractGroups %7B%0A        protected TestGroups(final ProctorResult proctorResult) %7B%0A            super(proctorResult);%0A        %7D%0A    %7D%0A%0A    private TestGroups groups;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        final ProctorResult proctorResult = new ProctorResult(%0A                %220%22,%0A                ImmutableMap.of(%0A                        %22bgtst%22, new TestBucket(%22control%22, 0, %22control%22),%0A                        %22abtst%22, new TestBucket(%22active%22, 1, %22active%22),%0A                        %22btntst%22, new TestBucket(%22inactive%22, -1, %22inactive%22)%0A                ),%0A                ImmutableMap.of(%0A                        %22bgtst%22, new Allocation(null, Arrays.asList(new Range(0, 1.0)), %22#A1%22),%0A                        %22abtst%22, new Allocation(null, Arrays.asList(new Range(1, 1.0)), %22#B2%22),%0A                        %22btntst%22, new Allocation(null, Arrays.asList(new Range(-1, 1.0)), %22#C3%22)%0A                ),%0A                ImmutableMap.of(%0A                        %22bgtst%22, new ConsumableTestDefinition(),%0A                        %22abtst%22, new ConsumableTestDefinition(),%0A                        %22btntst%22, new ConsumableTestDefinition()%0A                )%0A        );%0A        groups = new TestGroups(proctorResult);%0A    %7D%0A%0A    @Test%0A    public void testGetLoggingTestNames() %7B%0A        assertEquals(%0A                Sets.newHashSet(%22bgtst%22, %22abtst%22),%0A                Sets.newHashSet(groups.getLoggingTestNames())%0A        );%0A    %7D%0A%0A    @Test%0A    public void testAppendTestGroupsWithoutAllocations() %7B%0A        final StringBuilder builder = new StringBuilder();%0A        groups.appendTestGroupsWithoutAllocations(builder, ',', Lists.newArrayList(%22bgtst%22, %22abtst%22));%0A        assertEquals(%0A                Sets.newHashSet(%22bgtst0%22, %22abtst1%22),%0A                Sets.newHashSet(builder.toString().split(%22,%22))%0A        );%0A    %7D%0A%0A    @Test%0A    public void testAppendTestGroupsWithAllocations() %7B%0A        final StringBuilder builder = new StringBuilder();%0A        groups.appendTestGroupsWithAllocations(builder, ',', Lists.newArrayList(%22bgtst%22, %22abtst%22));%0A        assertEquals(%0A                Sets.newHashSet(%22#A1:bgtst0%22, %22#B2:abtst1%22),%0A                Sets.newHashSet(builder.toString().split(%22,%22))%0A        );%0A    %7D%0A%0A    @Test%0A    public void testAppendTestGroups() %7B%0A        final StringBuilder builder = new StringBuilder();%0A        groups.appendTestGroups(builder, ',');%0A        assertEquals(%0A                Sets.newHashSet(%22bgtst0%22, %22abtst1%22, %22#A1:bgtst0%22, %22#B2:abtst1%22),%0A                Sets.newHashSet(builder.toString().split(%22,%22))%0A        );%0A    %7D%0A%7D

Add unit test for AbstractGroups