his is really just a test of MemoryCache
. I could have made it much simpler, removed all of the extra code, and just tested MemoryCache
, but this takes into account the possibility of error in the surrounding logic. I only write tests like this to be sure that I'm not making wrong assumptions about how something like this works.