diff options
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java index 28ad98a5..a57ddca6 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java @@ -25,4 +25,12 @@ public class CraftItemStackTest { assert (clone.getTypeId() == itemStack.getTypeId()); assert (clone.getData().equals(itemStack.getData())); } + + @Test + public void testCloneNullItem() throws Exception { + net.minecraft.server.ItemStack nmsItemStack = null; + ItemStack itemStack = new CraftItemStack(nmsItemStack); + ItemStack clone = itemStack.clone(); + assert (clone.equals(itemStack)); + } } |