Refactor assert_true