Unit tests for the object cache

Let's make sure we don't break things.