Use a mockable BlockGenerator to simplify testing.
Add first tests for setSize. Benchmark writing to cache.