* Creates a new MemoryMessageIdRepository with a memory based respository.
* <b>Warning</b> this method should only really be used for testing as it
* will involve keeping all message IDs in RAM.
*/
public static MessageIdRepository memoryMessageIdRepository(int cacheSize) {
return memoryMessageIdRepository(new LRUCache(cacheSize));
}