### Question:
LocalConfig { public synchronized void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue) { checkArgument(configProperty != null, "Config property cannot be null"); checkArgument(checkNotInGlobalScope(configProperty), String.format("The configuration property (%s) is not supported in local config.", configProperty)); checkArgument(configPropertyValue != null, "Config property value cannot be null"); baseConfig.setProperty(configProperty.getName(), configPropertyValue); } LocalConfig();  LocalConfig(ConfigProperty configProperty, String value);  LocalConfig(Map<ConfigProperty, String> initialValues); synchronized String getConfigProperty(Config.ConfigProperty configProperty); synchronized List<Object> getListConfigProperty(Config.ConfigProperty configProperty); synchronized int getIntConfigProperty(Config.ConfigProperty configProperty); synchronized boolean getBooleanConfigProperty(Config.ConfigProperty configProperty); synchronized void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue); synchronized void printConfigValues(String testName); synchronized Map<String, String> getLocalConfigValues(); synchronized boolean isLocalValuePresent(ConfigProperty configProperty);  }### Answer:
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testExceptionWhenAddingGlobalScopePropToLocalConfigThroughSetter() { LocalConfig cfg = new LocalConfig(); cfg.setConfigProperty(getPropertiesWithGlobalScope().get(0), "foo"); }