Assume you wish to enter a restroom you know to be a single-person restroom not restricted to any particular gender. The door is closed and you can't easily ascertain whether the light's on, and therefore whether someone's in it, or whether the door was just accidentally closed. Assuming the following additional information, do do you test the handle to see if it's locked (and open the door if it's not), or do you knock first (and then test the handle if you don't hear an answer)?
If the bathroom is in a very public place, such as in a theater or concert venue?
If the bathroom is a port-a-potty at a festival, and it has an indicator showing that it's occupied, but you suspect the indicator may be broken?
If the bathroom is in someone's home (perhaps with a small party going on, such that you don't know if anyone's in there)?
If the bathroom is in a workplace of a couple dozen employees, all of whom you know?
Same workplace, but you know that there are people who feel surprisingly strongly about both sides of the issue, that their choice is correct?