Refactor test framework
Fix entitlement tests-- had wrong assertions which passed because we wre using assert_not_nil instead of assert_equal...