assertEquals(mode2, permission.getACEMode(1));
//get the written acl data
ByteArray buf = os.data();
byte data[] = new byte[buf.size()];
buf.copyTo(data, 0);
//create a new permission instance
SimpleACLPermission permission2 = new SimpleACLPermission(mockSecurityManager);