### Question:
ElastiCacheRaiderImpl implements ElastiCacheRaider { @Override public List<String> getSecurityGroups(String clusterName) { List<String> secGroupIds = elastiCacheDelegator.getAmazonElastiCache().describeCacheClusters(new DescribeCacheClustersRequest() .withCacheClusterId(clusterName)) .getCacheClusters() .get(0) .getSecurityGroups() .stream() .map(SecurityGroupMembership::getSecurityGroupId) .collect(Collectors.toList()); return secGroupIds; } ElastiCacheRaiderImpl(); @Override void rebootElastiCacheCluster(String clusterName, Integer numNodes); @Override void detachSubnet(String clusterName, String subnetId); @Override void attachSubnet(String clusterName, String subnetId); @Override String getElastiCacheClusterStatus(String clusterName); @Override void addNodesToCluster(String clusterName, Integer numNodes); Integer getNumNodes(String clusterName); @Override void removeNodesFromCluster(String clusterName, Integer numNodes); List<String> getSubnetIds(String clusterName); @Override void changeSecurityGroupId(String clusterName, String fromSecurityGroupId, String toSecurityGroupId); @Override List<String> getSecurityGroups(String clusterName); List<CacheNode> getAllElasticCacheNodes(); List<CacheNode> getAllElasticCacheNodesForGivenCluster(String clusterName); @Override List<String> getAllElastiCacheNodeNames(); @Override List<String> getAllElastiCacheNodeNames(String clusterName); @Override String getElastiCacheNodeStatus(String nodeName); @Override void rebootElasticCacheNode(String nodeName);  }### Answer:
@Test public void testGetSecurityGroups(){ List<String> secGroupIds = elastiCacheRaider.getSecurityGroups("cacheCluster"); Assert.assertEquals(secGroupIds.get(0), "sg-123"); }