### Question:
CloudStorageManifester { protected void validateCloudStorage(String cloudPlatform, SdxCloudStorageRequest cloudStorage) { if (CloudPlatform.AWS.name().equalsIgnoreCase(cloudPlatform)) { if (cloudStorage.getS3() == null || StringUtils.isEmpty(cloudStorage.getS3().getInstanceProfile())) { throw new BadRequestException("instance profile must be defined for S3"); } if (!cloudStorage.getBaseLocation().startsWith(FileSystemType.S3.getProtocol() + ": throw new BadRequestException("AWS baselocation missing protocol. please specify s3a: } } }  CloudStorageRequest initCloudStorageRequest(DetailedEnvironmentResponse environment,
            ClusterV4Request clusterRequest, SdxCluster sdxCluster, SdxClusterRequest sdxClusterRequest);  }### Answer:
@Test public void throwErrorWhenS3LocationInvalid() { SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest(); cloudStorageRequest.setBaseLocation("cloudbreakbucket/something"); S3CloudStorageV1Parameters params = new S3CloudStorageV1Parameters(); params.setInstanceProfile("instanceProfile"); cloudStorageRequest.setS3(params); Assertions.assertThrows(BadRequestException.class, () -> underTest.validateCloudStorage(CloudPlatform.AWS.toString(), cloudStorageRequest), "AWS baselocation missing protocol. please specify s3a: }
@Test public void okWhenS3LocationIsValid() { SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest(); cloudStorageRequest.setBaseLocation("s3a: S3CloudStorageV1Parameters params = new S3CloudStorageV1Parameters(); params.setInstanceProfile("instanceProfile"); cloudStorageRequest.setS3(params); underTest.validateCloudStorage(CloudPlatform.AWS.toString(), cloudStorageRequest); }