### Question:
CarbonSecurityManager extends SecurityManager { @Override public void checkPropertyAccess(String key) { for (String restrictedProperty : deniedProperties) { if (key.matches(restrictedProperty)) { super.checkPropertiesAccess(); } } super.checkPropertyAccess(key); } CarbonSecurityManager(); @Override void checkPropertyAccess(String key); void checkAccess(ThreadGroup g); void checkAccess(Thread t);  }### Answer:
@Test(expectedExceptions = AccessControlException.class) public void testCheckPropertyAccessDeniedProperty() { String key = "mockDeniedProperty"; System.setProperty("denied.system.properties", key); carbonSecurityManager = new CarbonSecurityManager(); carbonSecurityManager.checkPropertyAccess(key); }