@Test void testGetOperations() { ResponseEntity<List<Operation>> response = testedClass.getOperations(SPACE_GUID, null, List.of(Operation.State.FINISHED.toString(), Operation.State.ABORTED.toString()), 1); List<Operation> operations = response.getBody(); assertEquals(2, operations.size()); assertEquals(Operation.State.FINISHED, operations.get(0) .getState()); assertEquals(Operation.State.ABORTED, operations.get(1) .getState()); }
@Override public ResponseEntity<List<Operation>> getOperations(String spaceGuid, String mtaId, List<String> stateStrings, Integer last) { List<Operation.State> states = getStates(stateStrings); List<Operation> operations = filterByQueryParameters(last, states, spaceGuid, mtaId); return ResponseEntity.ok() .body(operations); }
OperationsApiServiceImpl implements OperationsApiService { @Override public ResponseEntity<List<Operation>> getOperations(String spaceGuid, String mtaId, List<String> stateStrings, Integer last) { List<Operation.State> states = getStates(stateStrings); List<Operation> operations = filterByQueryParameters(last, states, spaceGuid, mtaId); return ResponseEntity.ok() .body(operations); } }
OperationsApiServiceImpl implements OperationsApiService { @Override public ResponseEntity<List<Operation>> getOperations(String spaceGuid, String mtaId, List<String> stateStrings, Integer last) { List<Operation.State> states = getStates(stateStrings); List<Operation> operations = filterByQueryParameters(last, states, spaceGuid, mtaId); return ResponseEntity.ok() .body(operations); }  }
OperationsApiServiceImpl implements OperationsApiService { @Override public ResponseEntity<List<Operation>> getOperations(String spaceGuid, String mtaId, List<String> stateStrings, Integer last) { List<Operation.State> states = getStates(stateStrings); List<Operation> operations = filterByQueryParameters(last, states, spaceGuid, mtaId); return ResponseEntity.ok() .body(operations); }  @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); }
OperationsApiServiceImpl implements OperationsApiService { @Override public ResponseEntity<List<Operation>> getOperations(String spaceGuid, String mtaId, List<String> stateStrings, Integer last) { List<Operation.State> states = getStates(stateStrings); List<Operation> operations = filterByQueryParameters(last, states, spaceGuid, mtaId); return ResponseEntity.ok() .body(operations); }  @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);  }