### Question:
AddOrganism { public AddOrganismEngineResponseDto process() throws ApplicationException { checkId(); try { cache.initNamespace(Data.CORE, request.getOrganismId()); buildNodeIds(request.getOrganismId(), request.getNodeIds()); buildDatasetInfo(request.getOrganismId(), request.getNodeIds().size()); buildEmptyNetworkIds(request.getOrganismId()); buildEmptyAttributeGroupIds(request.getOrganismId()); } catch (DataStoreException e) { throw new ApplicationException("failed to add organism", e); } AddOrganismEngineResponseDto response = new AddOrganismEngineResponseDto(); return response; } AddOrganism(DataCache cache, AddOrganismEngineRequestDto request); AddOrganismEngineResponseDto process(); void checkId(); void buildDatasetInfo(long organismId, int numNodes); void buildNodeIds(long organismId, Collection<Long> allNodeIds); void buildEmptyNetworkIds(long organimsId); void buildEmptyAttributeGroupIds(long organismId); static long[] buildPrimitiveTable(Collection<Long> list);  }### Answer:
@Test public void testProcess() throws Exception { AddOrganismEngineRequestDto request = new AddOrganismEngineRequestDto(); long newOrgId = org1Id + 10; HashSet<Long> newNodeIds = new HashSet<Long>(); for (Long i: new long[] {7, 17, 27, 37, 47}) { newNodeIds.add(i); } request.setOrganismId(newOrgId); request.setNodeIds(newNodeIds); request.setProgressReporter(NullProgressReporter.instance()); IMania mania = new Mania2(cacheBuilder.getCache()); AddOrganismEngineResponseDto response = mania.addOrganism(request); assertNotNull(response); DatasetInfo info = cacheBuilder.getCache().getDatasetInfo(newOrgId); assertNotNull(info); NodeIds nodeIds = cacheBuilder.getCache().getNodeIds(newOrgId); assertNotNull(nodeIds); assertEquals(newNodeIds.size(), nodeIds.getNodeIds().length); for (long id: nodeIds.getNodeIds()) { assertTrue(newNodeIds.contains(id)); } NetworkIds networkIds = cacheBuilder.getCache().getNetworkIds(Data.CORE, newOrgId); assertNotNull(networkIds); assertNotNull(networkIds.getNetworkIds()); assertEquals(0, networkIds.getNetworkIds().length); }