Unit tests for Cache