ConfigKey { public boolean isSameKeyAs(Object obj) { if(this.equals(obj)) { return true; } else if (obj instanceof String) { String key = (String)obj; return key.equals(_name); } throw new CloudRuntimeException("Comparing ConfigKey to " + obj.toString()); } ConfigKey(String category, Class<T> type, String name, String defaultValue, String description, boolean isDynamic, Scope scope);  ConfigKey(String category, Class<T> type, String name, String defaultValue, String description, boolean isDynamic);  ConfigKey(Class<T> type, String name, String category, String defaultValue, String description, boolean isDynamic, Scope scope, T multiplier); @Deprecated  ConfigKey(Class<T> type, String name, String category, String defaultValue, String description, boolean isDynamic); String category(); Class<T> type(); final String key(); String defaultValue(); String description(); Scope scope(); boolean isDynamic(); @Override String toString(); static void init(ConfigDepotImpl depot); T multiplier(); @Override int hashCode(); @Override boolean equals(Object obj); boolean isSameKeyAs(Object obj); T value(); T valueIn(Long id);  }
@Test public void testIsSameKeyAs() { ConfigKey key = new ConfigKey("cat", String.class, "naam", "nick", "bijnaam", true, Scope.Cluster); Assert.assertTrue("1 and one should be considdered the same address", key.isSameKeyAs("naam")); }
@Test(expected = CloudRuntimeException.class) public void testIsSameKeyAsThrowingCloudRuntimeException() { ConfigKey key = new ConfigKey("hond", Boolean.class, "naam", "truus", "thrown name", false); Assert.assertFalse("zero and 0L should be considdered the same address", key.isSameKeyAs(0L)); }