Runtime check reuses test utility method hasSecurityException