test_class.declarator: metadataStorage = new ConcurrentHashMap<>()
test_class.modifier: private final
test_class.original_string: private final ConcurrentMap<UUID, Future<?>> metadataStorage = new ConcurrentHashMap<>();
test_class.type: ConcurrentMap<UUID, Future<?>>
test_class.var_name: metadataStorage
test_class.file: modules/tensorflow/src/test/java/org/apache/ignite/tensorflow/core/longrunning/task/LongRunningProcessStopTaskTest.java
test_class.identifier: LongRunningProcessStopTaskTest
test_case.body: @Test
      public void testCallProcessIsDone() {
          UUID procId = UUID.randomUUID();
  
          Future<?> fut = mock(Future.class);
          doReturn(true).when(fut).isDone();
          metadataStorage.put(procId, fut);
  
          LongRunningProcessStopTask stopTask = createTask(procId, true);
  
          List<LongRunningProcessStatus> statuses = stopTask.call();
  
          assertEquals(1, statuses.size());
          verify(fut).cancel(eq(true));
  
          LongRunningProcessStatus status = statuses.get(0);
          assertEquals(LongRunningProcessState.DONE, status.getState());
          assertNull(status.getException());
  
          assertEquals(0, metadataStorage.size());
      }
test_case.class_method_signature: LongRunningProcessStopTaskTest.testCallProcessIsDone()
test_case.full_signature: @Test public void testCallProcessIsDone()
test_case.identifier: testCallProcessIsDone
test_case.invocations: randomUUID mock isDone when doReturn put createTask call assertEquals size cancel verify eq get assertEquals getState assertNull getException assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCallProcessIsDone()
focal_class.declarator: serialVersionUID = -5552468435820611170L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -5552468435820611170L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: procIds
focal_class.modifier: private final
focal_class.original_string: private final List<UUID> procIds;
focal_class.type: List<UUID>
focal_class.var_name: procIds
focal_class.declarator: clear
focal_class.modifier: private final
focal_class.original_string: private final boolean clear;
focal_class.type: boolean
focal_class.var_name: clear
focal_class.file: modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/core/longrunning/task/LongRunningProcessStopTask.java
focal_class.identifier: LongRunningProcessStopTask
focal_class.class_method_signature: LongRunningProcessStopTask.LongRunningProcessStopTask(List<UUID> procIds, boolean clear)
focal_class.full_signature: public  LongRunningProcessStopTask(List<UUID> procIds, boolean clear)
focal_class.identifier: LongRunningProcessStopTask
focal_class.modifiers: public
focal_class.parameters: (List<UUID> procIds, boolean clear)
focal_class.signature:  LongRunningProcessStopTask(List<UUID> procIds, boolean clear)
focal_class.class_method_signature: LongRunningProcessStopTask.call()
focal_class.full_signature: @Override public List<LongRunningProcessStatus> call()
focal_class.identifier: call
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<LongRunningProcessStatus>
focal_class.signature: List<LongRunningProcessStatus> call()
focal_class.class_method_signature: LongRunningProcessStopTask.stopProcess(UUID procId)
focal_class.full_signature: private LongRunningProcessStatus stopProcess(UUID procId)
focal_class.identifier: stopProcess
focal_class.modifiers: private
focal_class.parameters: (UUID procId)
focal_class.return: LongRunningProcessStatus
focal_class.signature: LongRunningProcessStatus stopProcess(UUID procId)
focal_class.class_method_signature: LongRunningProcessStopTask.removeProcessesFromMetadataStorage()
focal_class.full_signature: private void removeProcessesFromMetadataStorage()
focal_class.identifier: removeProcessesFromMetadataStorage
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void removeProcessesFromMetadataStorage()
focal_class.superclass: extends LongRunningProcessTask<List<LongRunningProcessStatus>>
focal_method.body: @Override public List<LongRunningProcessStatus> call() {
          ArrayList<LongRunningProcessStatus> res = new ArrayList<>();
  
          for (UUID prodId : procIds)
              res.add(stopProcess(prodId));
  
          // All-or-nothing strategy. Processes will be removed only if all processes can be removed.
          if (clear)
              removeProcessesFromMetadataStorage();
  
          return res;
      }
focal_method.class_method_signature: LongRunningProcessStopTask.call()
focal_method.full_signature: @Override public List<LongRunningProcessStatus> call()
focal_method.identifier: call
focal_method.invocations: add stopProcess removeProcessesFromMetadataStorage
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: List<LongRunningProcessStatus>
focal_method.signature: List<LongRunningProcessStatus> call()