Fix cache unit tests