added test cases for cache write and emptyWay function