added method for clearing cache for unit testing
added primitive unit tests