summaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/bukkit/metadata/MetadataStoreTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/metadata/MetadataStoreTest.java b/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
index f35d5be4..30f03686 100644
--- a/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
+++ b/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
@@ -97,6 +97,15 @@ public class MetadataStoreTest {
}
@Test
+ public void testMetadataRemoveLast() {
+ subject.setMetadata("subject", "key", new FixedMetadataValue(pluginX, 10));
+ subject.removeMetadata("subject", "key", pluginX);
+
+ assertFalse(subject.hasMetadata("subject", "key"));
+ assertEquals(0, subject.getMetadata("subject", "key").size());
+ }
+
+ @Test
public void testMetadataRemoveForNonExistingPlugin() {
subject.setMetadata("subject", "key", new FixedMetadataValue(pluginX, 10));
subject.removeMetadata("subject", "key", pluginY);