Add a test for write protection