### Question:
AverageByNetworkCalculator extends AbstractNetworkWeightCalculator { public void process() throws ApplicationException { int i = 0; for (Collection<Long> group: networkIds) { for (long id: group) { IndexToNetworkIdMap.put(i, id); i++; } } progress.setStatus(Constants.PROGRESS_WEIGHTING_MESSAGE); progress.setProgress(Constants.PROGRESS_WEIGHTING); QueryEnrichedAttributeScorer attributeScorer = new QueryEnrichedAttributeScorer(cache, label, MIN_QUERY_GENES_PER_ATTRIBUTE); FeatureList featureList = buildFeatureList(attributeScorer, true); weights = average(featureList); progress.setStatus(Constants.PROGRESS_COMBINING_MESSAGE); progress.setProgress(Constants.PROGRESS_COMBINING); combinedMatrix = CombineNetworksOnly.combine(weights, namespace, organismId, cache, progress); } AverageByNetworkCalculator(String namespace, DataCache cache, Collection<Collection<Long>> networkIds, 
    		Collection<Long> attributeGroupIds, long organismId, Vector label, int attributesLimit, ProgressReporter progress); void process(); @Override String getParameterKey(); static final String PARAM_KEY_FORMAT; }### Answer:
@Test public void testProcess() throws Exception { System.out.println("process"); Collection<Collection<Long>> groups = new ArrayList<Collection<Long>>(); Collection<Long> group = new ArrayList<Long>(); for (int i=0; i<config.getOrg1NetworkIds().length; i++) { group.add(config.getOrg1NetworkIds()[i]); } groups.add(group); Collection<Long> attributeGroups = new ArrayList<Long>(); INetworkWeightCalculator calculator = new AverageByNetworkCalculator(Data.CORE, cacheBuilder.getCache(), groups, attributeGroups, config.getOrg1Id(), null, Config.instance().getAttributeEnrichmentMaxSize(), NullProgressReporter.instance()); calculator.process(); Map<Long, Double> weights = AbstractNetworkWeightCalculator.convertToWeightMap(calculator.getWeights()); assertNotNull(weights); assertEquals(config.getOrg1NetworkIds().length, weights.size()); for (Double weight: weights.values()) { assertEquals(1d/config.getOrg1NetworkIds().length, weight, .000001d); } }