### Question:
JedisNodeClient implements JedisClient { @Override public void set(String key, String sessionsKey, byte[] session, int timeout) throws UnsupportedEncodingException { try(Jedis jedis = this.jedisPool.getResource()) { Transaction t = jedis.multi(); t.setex(key.getBytes(Protocol.CHARSET), timeout, session); t.sadd(sessionsKey, key); t.exec(); } } 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 set() throws UnsupportedEncodingException { byte[] session = "session".getBytes(); this.jedisNodeClient.set("key", SESSIONS_KEY, session, timeout); verify(this.transaction, times(1)).setex("key".getBytes(Protocol.CHARSET), timeout, session); verify(this.transaction, times(1)).sadd(SESSIONS_KEY,"key"); verify(this.transaction, times(1)).exec(); verify(this.jedis, times(1)).close(); }