@@ -0,0 +1,1546 @@
+package uk.ac.ebi.quickgo.index.annotation.costats;%0A%0Aimport uk.ac.ebi.quickgo.index.annotation.Annotation;%0A%0Aimport java.util.function.Predicate;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport static org.mockito.Mockito.never;%0Aimport static org.mockito.Mockito.times;%0Aimport static org.mockito.Mockito.verify;%0A%0A/**%0A * @author Tony Wardell%0A * Date: 08/09/2016%0A * Time: 13:59%0A * Created with IntelliJ IDEA.%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class AnnotationCoStatsProcessorTest %7B%0A%0A    @Mock%0A    CoStatsPermutations coStatsPermutations;%0A%0A    @Mock%0A    Annotation annotation;%0A%0A    @Test%0A    public void testAnnotationAddedToCoStatsIfPredicateAllows() throws Exception%7B%0A        Predicate%3CAnnotation%3E toBeProcessed = t -%3E true;%0A        AnnotationCoStatsProcessor annotationCoStatsProcessor = new AnnotationCoStatsProcessor%0A                (coStatsPermutations, toBeProcessed);%0A        annotationCoStatsProcessor.process(annotation);%0A        verify(coStatsPermutations,times(1)).addRowToMatrix(annotation);%0A    %7D%0A%0A    @Test%0A    public void testAnnotationNotAddedToCoStatsIfPredicateForbids() throws Exception%7B%0A        Predicate%3CAnnotation%3E toBeProcessed = t -%3E false;%0A        AnnotationCoStatsProcessor annotationCoStatsProcessor = new AnnotationCoStatsProcessor%0A                (coStatsPermutations, toBeProcessed);%0A        annotationCoStatsProcessor.process(annotation);%0A        verify(coStatsPermutations,never()).addRowToMatrix(annotation);%0A    %7D%0A%7D%0A

Test the AnnotationCoStatsProcessor class.