### Question:
UserNetworkProcessor { static UploadNetworkEngineResponseDto computeStats(SymMatrix network) { UploadNetworkEngineResponseDto response = new UploadNetworkEngineResponseDto(); int numInteractions = 0; double minVal = Double.POSITIVE_INFINITY; double maxVal = Double.NEGATIVE_INFINITY; MatrixCursor cursor = network.cursor(); while (cursor.next()) { double val = cursor.val(); if (val == 0d) { continue; } numInteractions += 1; if (val > maxVal) { maxVal = val; } if (val < minVal) { minVal = val; } } numInteractions = numInteractions/2; response.setNumInteractions(numInteractions); response.setMinValue(minVal); response.setMaxValue(maxVal); return response; } UserNetworkProcessor(DataCache cache, String tempDirname); UploadNetworkEngineResponseDto process(UploadNetworkEngineRequestDto request);  }### Answer:
@Test public void testComputeStats() { System.out.println("computeStats"); SymMatrix network = Config.instance().getMatrixFactory().symSparseMatrix(5); System.out.println("type of SymMatrix class: " + network.getClass().getName()); network.set(1, 2, 1.5); network.set(2, 3, .8); UploadNetworkEngineResponseDto result = UserNetworkProcessor.computeStats(network); assertNotNull(result); assertEquals( 2, result.getNumInteractions()); assertEquals( .8, result.getMinValue(), 10e-8); assertEquals(1.5, result.getMaxValue(), 10e-8); }