RedisClient { public void flushDb() { log.info("flush db..."); redisson.getKeys().flushdb(); } RedisClient(RedissonClient redisson); @SneakyThrows  RedisClient(@NonNull RedissonClient redisson, int expiryInSeconds); long nextTimestamp(final List<Object> keys); long dbSize(); boolean exists(final String region, final Object key); @SuppressWarnings("unchecked") T get(final String region, final Object key); boolean isExpired(final String region, final Object key); Set<Object> keysInRegion(final String region); long keySizeInRegion(final String region); Map<Object, Object> getAll(final String region); void set(final String region, final Object key, Object value); void set(final String region, final Object key, Object value, final long timeoutInSeconds); void set(final String region, final Object key, Object value, final long timeout, final TimeUnit unit); void expire(final String region); void del(final String region, final Object key); void mdel(final String region, final Collection<?> keys); void deleteRegion(final String region); void flushDb(); boolean isShutdown(); void shutdown();  }
@Test public void flushDb() { client.set(REGION_NAME, "flushDbKey", "value"); assertThat(client.dbSize()).isGreaterThan(0); client.flushDb(); assertThat(client.dbSize()).isEqualTo(0); }