Added tests for writing to readonly registers.