package uk.ac.ebi.quickgo.index.annotation.coterms;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;

/**
 * @author Tony Wardell
 * Date: 05/10/2016
 * Time: 16:41
 * Created with IntelliJ IDEA.
 */
public class CoTermsAggregatorMocker {

    /**
     * Mocks the {@code CoTermsAggregator#getGeneProductCounts} to product a count of gene products annotated by a
     * single GO Term.
     * @param count
     * @param termsLists
     * @return
     */
    static Map<String, AtomicLong> makeGpCountForTerm(int count, List<String>... termsLists ){
        Map<String, AtomicLong> termGpCount = new HashMap<>();

        for (int i = 0; i < termsLists.length; i++) {
            List<String> terms = termsLists[i];

            for (int j = 0; j < terms.size(); j++) {
                String s =  terms.get(j);
                termGpCount.put(s, new AtomicLong(count));
            }
        }

        return termGpCount;
    }
}

@@ -472,56 +472,249 @@
 ount
-%0A     * @param termsLists%0A     * @return%0A     */
+ the number that the count for Gene Product will be set to.%0A     * @param termsLists a list of GO Term identifiers used to seed a map of term::count used in testing%0A     * @return a map of term::count used in testing%0A     */%0A    @SafeVarargs
 %0A   
@@ -886,61 +886,8 @@
 or (
-int i = 0; i %3C termsLists.length; i++) %7B%0A            
 List
@@ -901,17 +901,17 @@
 %3E terms 
-=
+:
  termsLi
@@ -917,13 +917,11 @@
 ists
-%5Bi%5D;%0A
+) %7B
 %0A   
@@ -938,60 +938,8 @@
 or (
-int j = 0; j %3C terms.size(); j++) %7B%0A                
 Stri
@@ -947,24 +947,18 @@
 g s 
-= 
+:
  terms
-.get(j);
+) %7B
 %0A   

Add some javadoc. Add @SafeVarags annotation. Change for loops to for each.