class ElastiCacheRaiderImpl implements ElastiCacheRaider {

    @Override
    public void changeSecurityGroupId(String clusterName, String fromSecurityGroupId, String toSecurityGroupId) {

        List<String> securityGroupIds = this.getSecurityGroups(clusterName);
        securityGroupIds.add(toSecurityGroupId);
        securityGroupIds.remove(fromSecurityGroupId);

        ModifyCacheClusterRequest modifyCacheClusterRequest = new ModifyCacheClusterRequest()
                .withCacheClusterId(clusterName)
                .withSecurityGroupIds(securityGroupIds)
                .withApplyImmediately(true);

        try {
            elastiCacheDelegator.getAmazonElastiCache().modifyCacheCluster(modifyCacheClusterRequest);
        } catch (Exception ex) {
            throw new RuntimeException(ex.getMessage());
        }

    }

    public  ElastiCacheRaiderImpl();

}