Unit tests for ErrorPageCacheImpl and minor code cleanup