### Question:
RedisClient implements Client { @Override public void set(final byte[] key, final byte[] value) throws ConnectionException, IOException { runVoidCommand(RedisCommands.SET, key, value); } RedisClient(final RedisCommandExecutor redisCommandExecutor,
      final RedisCommandResult redisCommandResult);  RedisClient(final Connection connection);  RedisClient();  RedisClient(final String host);  RedisClient(final String host, final int port); @Override void ping(); @Override void set(final byte[] key, final byte[] value); @Override void set(final byte[] key, final byte[] value, final long expiryInMillis); byte[] longToBytes(final long longToBeConverted); @Override byte[] get(final byte[] key); @Override byte[] expire(final byte[] key); @Override void flushdb(); @Override int dbsize();  }### Answer:
@Test public void set() throws ConnectionException, IOException { byte[] key = {'1'}; byte[] value = {'1'}; doReturn("OK").when(commandResult).getStatus(); redisClient.set(key, value); verify(redisClient).runVoidCommand(RedisCommands.SET, key, value); verify(commandExecutor).execute(RedisCommands.SET, key, value); }
@Test public void setWithTimeout() throws ConnectionException, IOException { byte[] key = {'1'}; byte[] value = {'1'}; final long millis = 10; doReturn("OK").when(commandResult).getStatus(); redisClient.set(key, value, millis); verify(commandExecutor).execute(RedisCommands.SET, key, value); verify(commandExecutor).execute(RedisCommands.PEXPIRE, key, Long.toString(millis).getBytes()); }