Added tests + Fix CheckCondition bug : cache expiration was not valid