Add tests for the protection key change

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>