### Question:
CombineNetworks { public NetworkCombinationResponseDto process() throws ApplicationException { SymMatrix combined = combine(); visit(combined); return new NetworkCombinationResponseDto(); } CombineNetworks(DataCache cache, NetworkCombinationRequestDto request); NetworkCombinationResponseDto process();  }### Answer:
@Test public void testProcess() throws ApplicationException { System.out.println("testing"); NetworkCombinationRequestDto request = new NetworkCombinationRequestDto(); String namespace = Data.CORE; int N = config.getOrg1numNetworks() + config.getNumAttributeGroups()*config.getNumAttributesPerGroup(); double weight = 1d/N; List<NetworkDto> networks = getNetworks(namespace, config.getOrg1Id(), weight); Collection<AttributeDto> attributes = getAttributes(namespace, config.getOrg1Id(), weight); int i=1, j=2; NodeIds nodeIds = cacheBuilder.getCache().getNodeIds(config.getOrg1Id()); final long ni = nodeIds.getIdForIndex(i); final long nj = nodeIds.getIdForIndex(j); final double expected_i_j = calculateExpected(namespace, config.getOrg1Id(), networks, attributes, i, j, weight); final int[] found = new int[1]; request.setNamespace(namespace); request.setOrganismId(config.getOrg1Id()); request.setNetworks(networks); request.setAttributes(attributes); request.setInteractionVistor(new InteractionVisitor() { @Override public void visit(long node1, long node2, double weight) { if (node1 == node2) { fail("should not get diagonal elements"); } if (node1 == ni && node2 == nj) { fail("should only get sub-diagonal elements of symmetric pair"); } else if (node1 == nj && node2 == ni) { assertEquals(expected_i_j, weight, 1e-7); found[0]++; } } }); request.setProgressReporter(NullProgressReporter.instance()); CombineNetworks action = new CombineNetworks(cacheBuilder.getCache(), request); NetworkCombinationResponseDto result = action.process(); assertNotNull(result); assertEquals("expected values not in result", 1, found[0]); }