Here is how it worked on my last CO
EX flight w/one FA
& two pilots. First the FA
watched the bathroom (at the rear of the ERJ) and when the last person who occupied it left, she came back and locked the door. Then she went to the front and talked to the pilot on a microphone. The FO came out of the cockpit and the FA
went in, and he made sure the door was locked with the FA
and Captain inside. He walked to the back, used the lav, then walked back up and used the mic to talk to the cockpit. Then the door opened, and the FO went in & the Capt. came out (so the FO & FA
were inside), made sure it was locked, went to the back, then back up, called the cockpit on the mic, the door which was locked from the inside was opened and the FA
came out, Captain went in, and locked back up again.