@@ -0,0 +1,1618 @@
+package com.rackspacecloud.blueflood.inputs.processors;%0A%0Aimport com.rackspacecloud.blueflood.concurrent.ThreadPoolBuilder;%0Aimport com.rackspacecloud.blueflood.io.DiscoveryIO;%0Aimport com.rackspacecloud.blueflood.types.Metric;%0A%0Aimport org.junit.Test;%0Aimport static org.mockito.Mockito.*;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.concurrent.ThreadPoolExecutor;%0A%0A%0Apublic class DiscoveryWriterTest %7B%0A    private static int WRITE_THREADS = 50;%0A    @Test%0A    public void testProcessor() throws Exception %7B%0A        DiscoveryIO discovererA = mock(DiscoveryIO.class);%0A        DiscoveryIO discovererB = mock(DiscoveryIO.class);%0A        DiscoveryWriter discWriter =%0A                new DiscoveryWriter(new ThreadPoolBuilder()%0A                        .withName(%22Metric Discovery Writing%22)%0A                        .withCorePoolSize(WRITE_THREADS)%0A                        .withMaxPoolSize(WRITE_THREADS)%0A                        .withUnboundedQueue()%0A                        .withRejectedHandler(new ThreadPoolExecutor.AbortPolicy())%0A                        .build());%0A        discWriter.registerIO(discovererA);%0A        discWriter.registerIO(discovererB);%0A%0A        List%3CList%3CMetric%3E%3E testdata = new ArrayList%3CList%3CMetric%3E%3E();%0A        testdata.add(mock(List.class));%0A        testdata.add(mock(List.class));%0A        testdata.add(mock(List.class));%0A        testdata.add(mock(List.class));%0A%0A        discWriter.apply(testdata);%0A%0A        for (List%3CMetric%3E metrics : testdata) %7B%0A            verify(discovererA).insertDiscovery(metrics);%0A            verify(discovererB).insertDiscovery(metrics);%0A        %7D%0A    %7D%0A%7D%0A

Add unit test for DiscoveryWriter