public KinesisPermissionsResponse getPermissions() {

        final String setupPolicyString = policyAsJsonString(buildAwsSetupPolicy());
        final String autoSetupPolicyString = policyAsJsonString(buildAwsAutoSetupPolicy());
        return KinesisPermissionsResponse.create(setupPolicyString, autoSetupPolicyString);
    }
@Test
    public void testPermissions() {

        final KinesisPermissionsResponse permissions = awsService.getPermissions();

        // Verify that the setup policy contains some needed permissions.
        assertTrue(permissions.setupPolicy().contains("cloudwatch"));
        assertTrue(permissions.setupPolicy().contains("dynamodb"));
        assertTrue(permissions.setupPolicy().contains("ec2"));
        assertTrue(permissions.setupPolicy().contains("elasticloadbalancing"));
        assertTrue(permissions.setupPolicy().contains("kinesis"));

        // Verify that the auto-setup policy contains some needed permissions.
        assertTrue(permissions.autoSetupPolicy().contains("CreateStream"));
        assertTrue(permissions.autoSetupPolicy().contains("DescribeSubscriptionFilters"));
        assertTrue(permissions.autoSetupPolicy().contains("PutRecord"));
        assertTrue(permissions.autoSetupPolicy().contains("RegisterStreamConsumer"));
    }