### Question:
AbstractEntityAdjunct extends AbstractBrooklynObject implements BrooklynObjectInternal, EntityAdjunct, Configurable { @Override @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public AbstractEntityAdjunct configure(Map flags) { boolean isFirstTime = true; for (Iterator<Map.Entry> iter = flags.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = iter.next(); if (entry.getKey() instanceof ConfigKey) { ConfigKey key = (ConfigKey)entry.getKey(); if (adjunctType.getConfigKeys().contains(key)) { config().set(key, entry.getValue()); } else { log.warn("Unknown configuration key {} for policy {}; ignoring", key, this); iter.remove(); } } } ConfigBag bag = new ConfigBag().putAll(flags); FlagUtils.setFieldsFromFlags(this, bag, isFirstTime); FlagUtils.setAllConfigKeys(this, bag, false); leftoverProperties.putAll(bag.getUnusedConfig()); if (!truth(name) && leftoverProperties.containsKey("displayName")) { Preconditions.checkArgument(leftoverProperties.get("displayName") instanceof CharSequence, "'displayName' property should be a string"); setDisplayName(leftoverProperties.remove("displayName").toString()); } for (Object flag: leftoverProperties.keySet()) { ConfigKey<Object> key = ConfigKeys.newConfigKey(Object.class, Strings.toString(flag)); if (config().getRaw(key).isPresent()) { log.warn("Config '"+flag+"' on "+this+" conflicts with key already set; ignoring"); } else { config().set(key, leftoverProperties.get(flag)); } } return this; } AbstractEntityAdjunct();  AbstractEntityAdjunct(@SuppressWarnings("rawtypes") Map properties); @Override @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) AbstractEntityAdjunct configure(Map flags); @Override ConfigurationSupportInternal config(); @Override BasicSubscriptionSupport subscriptions(); @Override T getConfig(ConfigKey<T> key); @Override @Deprecated T setConfig(ConfigKey<T> key, T val); @Beta @Deprecated ConfigMap getConfigMap(); AdjunctType getAdjunctType(); @Override String getDisplayName(); @Override void setDisplayName(String name); void setEntity(EntityLocal entity); @Deprecated SubscriptionHandle subscribe(Entity producer, Sensor<T> sensor, SensorEventListener<? super T> listener); @Deprecated SubscriptionHandle subscribeToMembers(Group producerGroup, Sensor<T> sensor, SensorEventListener<? super T> listener); @Deprecated SubscriptionHandle subscribeToChildren(Entity producerParent, Sensor<T> sensor, SensorEventListener<? super T> listener); @Deprecated boolean unsubscribe(Entity producer); @Deprecated boolean unsubscribe(Entity producer, SubscriptionHandle handle); void destroy(); @Override boolean isDestroyed(); @Override boolean isRunning(); @Override String getUniqueTag(); @Override TagSupport tags(); @Override String toString();  }### Answer:
@Test public void testImmutableFlags() { TestAdjunct testAdjunct = new TestAdjunct(ImmutableMap.of("unusedKey", "unusedValue")); testAdjunct.configure(ImmutableMap.of("finalKey", "finalValue")); }