### Question:
RedisIdempotentMessageService implements IdempotentMessageService { @Override public void clean() { log.debug("Cleaning up messages metadata stored in Redis..."); Set<String> keys = fencyRedisTemplate.keys(PREFIX + "*"); fencyRedisTemplate.delete(keys); log.debug("{} messages deleted.", keys.size()); }  @Override void save(Message message); @Override Optional<Message> find(String messageId, String consumerQueueName); @Override void clean();  }### Answer:
@SuppressWarnings("unchecked") @Test void testClean() { idempotentMessageService.clean(); verify(mRedisTemplate).keys("message*"); verify(mRedisTemplate).delete(any(Set.class)); }