cache unit tests made more strong type checking