### Question:
SharedServiceValidator { public ValidationResult checkSharedServiceStackRequirements(StackV4Request request, Workspace workspace) { ValidationResultBuilder resultBuilder = ValidationResult.builder(); if (request.getSharedService() != null) { Long workspaceId = workspace.getId(); checkCloudPlatform(request, workspaceId, resultBuilder); } return resultBuilder.build(); }  ValidationResult checkSharedServiceStackRequirements(StackV4Request request, Workspace workspace);  }### Answer:
@Test public void testWithValidRequest() { StackV4Request stackRequest = getStackV4Request(CloudPlatform.GCP); when(stackViewService.findByName(eq(DATALAKE_NAME), anyLong())).thenReturn(Optional.ofNullable(getStackView())); ValidationResult validationResult = underTest.checkSharedServiceStackRequirements(stackRequest, getWorkspace()); assertFalse(validationResult.hasError()); }