assertTrue(Enchantment.getEnchantmentLevel(itemStack, VanillaEnchantments.FORTUNE) == 0);
}
@Test
public void testEnchantmentSword() {
ItemStack itemStack = new ItemStack(VanillaMaterials.DIAMOND_SWORD, 1);
Enchantment.addEnchantment(itemStack, VanillaEnchantments.KNOCKBACK, 2, false);
Enchantment.addEnchantment(itemStack, VanillaEnchantments.FORTUNE, 2, false);
assertTrue(!VanillaEnchantments.FORTUNE.canEnchant(VanillaMaterials.DIAMOND_SWORD));
assertTrue(Enchantment.getEnchantmentLevel(itemStack, VanillaEnchantments.KNOCKBACK) == 2);
assertTrue(Enchantment.getEnchantmentLevel(itemStack, VanillaEnchantments.FORTUNE) == 0);