### Question:
OperationsApiServiceImpl implements OperationsApiService { @Override public ResponseEntity<List<String>> getOperationActions(String spaceGuid, String operationId) { Operation operation = getOperation(operationId); return ResponseEntity.ok() .body(getAvailableActions(operation)); }  @Override ResponseEntity<List<Operation>> getOperations(String spaceGuid, String mtaId, List<String> stateStrings, Integer last); @Override ResponseEntity<Void> executeOperationAction(HttpServletRequest request, String spaceGuid, String operationId, String actionId); @Override ResponseEntity<List<Log>> getOperationLogs(String spaceGuid, String operationId); @Override ResponseEntity<String> getOperationLogContent(String spaceGuid, String operationId, String logId); @Override ResponseEntity<Operation> startOperation(HttpServletRequest request, String spaceGuid, Operation operation); @Override ResponseEntity<Operation> getOperation(String spaceGuid, String operationId, String embed); @Override ResponseEntity<List<String>> getOperationActions(String spaceGuid, String operationId);  }### Answer:
@Test void testGetOperationActionsForRunning() { ResponseEntity<List<String>> response = testedClass.getOperationActions(SPACE_GUID, RUNNING_PROCESS); List<String> actions = response.getBody(); assertEquals(Collections.singletonList(Action.ABORT.getActionId()), actions); }
@Test void testGetOperationActionsForFinished() { ResponseEntity<List<String>> response = testedClass.getOperationActions(SPACE_GUID, FINISHED_PROCESS); List<String> actions = response.getBody(); assertEquals(Collections.emptyList(), actions); }
@Test void testGetOperationActionsForAborted() { ResponseEntity<List<String>> response = testedClass.getOperationActions(SPACE_GUID, ABORTED_PROCESS); List<String> actions = response.getBody(); assertEquals(Collections.emptyList(), actions); }
@Test void testGetOperationActionsForError() { ResponseEntity<List<String>> response = testedClass.getOperationActions(SPACE_GUID, ERROR_PROCESS); List<String> actions = response.getBody(); assertEquals(List.of(Action.ABORT.getActionId(), Action.RETRY.getActionId()), actions); }
@Test void testGetOperationActionsOperationNotFound() { Assertions.assertThrows(NotFoundException.class, () -> testedClass.getOperationActions(SPACE_GUID, "notarealprocess")); }
@Test void testGetOperationActionsNotFound() { ResponseEntity<List<String>> response = testedClass.getOperationActions(SPACE_GUID, RUNNING_PROCESS); List<String> actions = response.getBody(); assertEquals(Collections.singletonList(Action.ABORT.getActionId()), actions); }