### Question:
OperationsApiServiceImpl implements OperationsApiService { @Override public ResponseEntity<List<Log>> getOperationLogs(String spaceGuid, String operationId) { try { getOperation(operationId); List<String> logIds = logsService.getLogNames(spaceGuid, operationId); List<Log> logs = logIds.stream() .map(id -> ImmutableLog.builder() .id(id) .build()) .collect(Collectors.toList()); return ResponseEntity.ok() .body(logs); } catch (FileStorageException e) { throw new ContentException(e, e.getMessage()); } }  @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 testGetOperationLogs() throws Exception { String processId = FINISHED_PROCESS; testedClass.getOperationLogs(SPACE_GUID, processId); Mockito.verify(logsService) .getLogNames(Mockito.eq(SPACE_GUID), Mockito.eq(processId)); }
@Test void testGetOperationLogsNotFoundOperation() { assertThrows(NotFoundException.class, () -> testedClass.getOperationLogs(SPACE_GUID, "notarealop")); }
@Test void testGetOperationLogsServiceException() throws Exception { String processId = FINISHED_PROCESS; Mockito.when(logsService.getLogNames(Mockito.eq(SPACE_GUID), Mockito.eq(processId))) .thenThrow(new FileStorageException("something went wrong")); Assertions.assertThrows(ContentException.class, () -> testedClass.getOperationLogs(SPACE_GUID, processId)); }