add some tests for permission mapping