assertTrue(GENERIC_WRITE != (rights.getValue().intValue() & GENERIC_WRITE));
}
public void testMapGenericExecuteMask() {
final GENERIC_MAPPING mapping = new GENERIC_MAPPING();
mapping.genericRead = new DWORD(FILE_GENERIC_READ);
mapping.genericWrite = new DWORD(FILE_GENERIC_WRITE);
mapping.genericExecute = new DWORD(FILE_GENERIC_EXECUTE);
mapping.genericAll = new DWORD(FILE_ALL_ACCESS);
final DWORDByReference rights = new DWORDByReference(new DWORD(GENERIC_EXECUTE));
Advapi32.INSTANCE.MapGenericMask(rights, mapping);
assertEquals(FILE_GENERIC_EXECUTE, rights.getValue().intValue());
assertTrue(GENERIC_EXECUTE != (rights.getValue().intValue() & GENERIC_EXECUTE));
}