FixedMetadataValue extends LazyMetadataValue { @Override public Object value() { return internalValue; } FixedMetadataValue(Plugin owningPlugin, final Object value); @Override void invalidate(); @Override Object value();  }
@Test public void testBasic() { subject = new FixedMetadataValue(plugin, new Integer(50)); assertSame(plugin, subject.getOwningPlugin()); assertEquals(new Integer(50), subject.value()); }
@Test public void testNumberTypes() { subject = new FixedMetadataValue(plugin, new Integer(5)); assertEquals(new Integer(5), subject.value()); assertEquals(5, subject.asInt()); assertEquals(true, subject.asBoolean()); assertEquals(5, subject.asByte()); assertEquals(5.0, subject.asFloat(), 0.1e-8); assertEquals(5.0D, subject.asDouble(), 0.1e-8D); assertEquals(5L, subject.asLong()); assertEquals(5, subject.asShort()); assertEquals("5", subject.asString()); }