### Question:
JedisNodeClient implements JedisClient { @Override public Set<String> getSessions(String sessionsKey) { try(Jedis jedis = this.jedisPool.getResource()) { return jedis.smembers(sessionsKey); } } JedisNodeClient(JedisPool jedisPool); @Override Set<String> getSessions(String sessionsKey); @Override void del(String sessionsKey, String key); @Override Integer count(String sessionsKey); @Override byte[] get(String key); @Override void set(String key, String sessionsKey, byte[] session, int timeout); @Override void clean(String sessionsKey); @Override void close();  }### Answer:
@Test public void getSessions() { Set<String> sessions = new HashSet<String>(Arrays.asList("s1")); when(this.jedis.smembers(SESSIONS_KEY)).thenReturn(sessions); Set<String> result = this.jedisNodeClient.getSessions(SESSIONS_KEY); assertEquals(1, result.size()); assertTrue(result.contains("s1")); verify(this.jedis, times(1)).close(); }