### Question:
SetCacheManager { public static void addSetMembers(String graphId, String setId, List<String> memberIds) { validateRequired(graphId, setId, memberIds, GraphCacheErrorCodes.ERR_CACHE_ADD_SET_MEMBER.name()); Jedis jedis = getRedisConncetion(); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); try { String[] members = new String[memberIds.size()]; for (int i = 0; i < memberIds.size(); i++) { members[i] = memberIds.get(i); } jedis.sadd(key, members); } catch (Exception e) { throw new ServerException(GraphCacheErrorCodes.ERR_CACHE_ADD_SET_MEMBER.name(), e.getMessage()); } finally { returnConnection(jedis); } }  static void createSet(String graphId, String setId, List<String> members); static void addSetMember(String graphId, String setId, String memberId); static void addSetMembers(String graphId, String setId, List<String> memberIds); static void removeSetMember(String graphId, String setId, String memberId); static void dropSet(String graphId, String setId); static List<String> getSetMembers(String graphId, String setId); static Long getSetCardinality(String graphId, String setId); static Boolean isSetMember(String graphId, String setId, String member);  }### Answer:
@Test(expected = ClientException.class) public void addSetMembersWithoutGraphId() { List<String> members = new ArrayList<String>(); members.add("do_1234567"); members.add("do_890"); SetCacheManager.addSetMembers(null, "set_123", members); }
@Test(expected = ClientException.class) public void addSetMembersWithoutSetId() { List<String> members = new ArrayList<String>(); members.add("do_1234567"); members.add("do_890"); SetCacheManager.addSetMembers("domain", null, members); }
@Test(expected = ClientException.class) public void addSetMembersWithoutMembersAndGraphId() { SetCacheManager.addSetMembers(null, "set_123", null); }
@Test(expected = ClientException.class) public void addSetMembersWithoutMembersAndSetId() { SetCacheManager.addSetMembers("domain", null, null); }
@Test(expected = ClientException.class) public void addSetMembersWithoutGraphIdAndSetId() { List<String> members = new ArrayList<String>(); members.add("do_1234567"); members.add("do_890"); SetCacheManager.addSetMembers(null, null, members); }
@Test(expected = ClientException.class) public void addSetMembersWithoutAllParams() { SetCacheManager.addSetMembers(null, null, null); }
@Test public void addSetMembers() { List<String> members = new ArrayList<String>(); members.add("do_1234567"); members.add("do_890"); SetCacheManager.addSetMembers("domain", "set_123", members); List<String> memberIds = SetCacheManager.getSetMembers("domain", "set_123"); Assert.assertEquals(true, memberIds.contains("do_1234567")); Assert.assertEquals(true, memberIds.contains("do_890")); }