I don't believe there is a specific provision saying it it illegal.
Brake checking, whereby you deliberately and suddenly brake just to get the car behind to slow down is illegal - dangerous driving.
Gently touching the brakes just to activate your brake lights without slowing can be considered an illegal act - dangerous driving as you have no valid obstacle in front of you. Depends on the attitude of the police who pull you over as to who cops the fine, or indeed if both you and the tailgater do.
Claim your bet on a technicality
What if you valid obstacle is the tailgater? Because if there to close, and you need to slow down they could rear-end you.