    @Test
    public void testPerformTaskOpenEnable() {

        // Expect calls to get bucket name
        EasyMock.expect(unwrappedS3Provider.getBucketName(EasyMock.isA(String.class)))
                .andReturn(bucketName);

        // Origin Access Id already exists and is reused
        expectExistingOriginAccessId();

        // Distribution exists, is set to OPEN streaming, and is disabled
        expectExistingOpenDistribution(false);

        // Distribution should be set to enabled
        Capture<UpdateDistributionRequest> updateDistRequestCapture = expectSetDistributionState();

        // Bucket policy should be set
        expectSetBucketPolicy();

        // Bucket CORS policy should be set
        Capture<BucketCrossOriginConfiguration> corsConfigCapture = expectSetCorsPolicy();

        // Bucket tags should be set
        Capture<Map<String, String>> spacePropsCapture = expectSetBucketTags();

        EnableHlsTaskRunner runner =
            new EnableHlsTaskRunner(s3Provider, unwrappedS3Provider, s3Client,
                                    cfClient, cfAccountId, dcHost);
        // Replay mocks
        replayMocks();

        // Verify success
        EnableStreamingTaskParameters taskParams = new EnableStreamingTaskParameters();
        taskParams.setSpaceId(spaceId);
        taskParams.setSecure(false); // OPEN streaming

        String results = runner.performTask(taskParams.serialize());
        assertNotNull(results);
        EnableStreamingTaskResult taskResult = EnableStreamingTaskResult.deserialize(results);
        assertNotNull(taskResult);
        assertEquals(domainName, taskResult.getStreamingHost());

        // Verify update distribution request
        UpdateDistributionRequest updateDistRequest = updateDistRequestCapture.getValue();
        assertTrue(updateDistRequest.getDistributionConfig().getEnabled());

        // Verify CORS policy
        BucketCrossOriginConfiguration corsConfig = corsConfigCapture.getValue();
        assertEquals(1, corsConfig.getRules().size());
        CORSRule corsRule = corsConfig.getRules().get(0);
        assertEquals(1, corsRule.getAllowedOrigins().size());
        assertEquals("https://*", corsRule.getAllowedOrigins().get(0));
        assertEquals(2, corsRule.getAllowedMethods().size());
        assertEquals(1, corsRule.getAllowedHeaders().size());
        assertEquals("*", corsRule.getAllowedHeaders().get(0));

        // Verify bucket tags
        Map<String, String> spaceProps = spacePropsCapture.getValue();
        assertEquals(domainName, spaceProps.get(HLS_STREAMING_HOST_PROP));
        assertEquals("OPEN", spaceProps.get(HLS_STREAMING_TYPE_PROP));
    }