### Question:
SetCacheManager { public static void addSetMember(String graphId, String setId, String memberId) { validateRequired(graphId, setId, memberId, GraphCacheErrorCodes.ERR_CACHE_ADD_SET_MEMBER.name()); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); Jedis jedis = getRedisConncetion(); try { jedis.sadd(key, memberId); } 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 addSetMemberWithoutSetId() { List<String> members = new ArrayList<String>(); members.add("do_123456"); SetCacheManager.addSetMember("domain", null, "do_123456"); }
@Test(expected = ClientException.class) public void addSetMemberWithoutMemberId() { List<String> members = new ArrayList<String>(); members.add("do_123456"); SetCacheManager.addSetMember("domain", "set_123", null); }
@Test(expected = ClientException.class) public void addSetMemberWithoutMemberIdAndSetId() { SetCacheManager.addSetMember("domain", null, null); }
@Test(expected = ClientException.class) public void addSetMemberWithoutMemberIdAndGraphId() { List<String> members = new ArrayList<String>(); members.add("do_123456"); SetCacheManager.addSetMember(null, "set_123", null); }
@Test(expected = ClientException.class) public void addSetMemberWithoutGraphIdAndSetId() { SetCacheManager.addSetMember(null, null, "do_123456"); }
@Test public void addSetMember() { SetCacheManager.addSetMember("domain", "set_123", "testMember"); List<String> membersList = SetCacheManager.getSetMembers("domain", "set_123"); Assert.assertEquals(false, membersList.isEmpty()); Assert.assertTrue(membersList.contains("testMember")); }
@Test(expected = ClientException.class) public void addSetMemberWithoutgraphId() { List<String> members = new ArrayList<String>(); members.add("do_123456"); SetCacheManager.addSetMember(null, "set_123", "do_123456"); }