MetadataValueAdapter implements MetadataValue { public Plugin getOwningPlugin() { return owningPlugin.get(); } protected  MetadataValueAdapter(Plugin owningPlugin); Plugin getOwningPlugin(); int asInt(); float asFloat(); double asDouble(); long asLong(); short asShort(); byte asByte(); boolean asBoolean(); String asString();  }
@Test public void testAdapterBasics() { IncrementingMetaValue mv = new IncrementingMetaValue(plugin); assertEquals(mv.getOwningPlugin(), this.plugin); assertEquals(new Integer(1), mv.value()); assertEquals(new Integer(2), mv.value()); mv.invalidate(); assertEquals(new Integer(1), mv.value()); }