ItemStack test = new ItemStack(VanillaMaterials.DIAMOND_CHESTPLATE, 1);
Enchantment.addEnchantment(test, VanillaEnchantments.PROTECTION, 4, false);
assertTrue(Enchantment.hasEnchantment(test, VanillaEnchantments.PROTECTION));
Armor armor = (Armor) test.getMaterial();
assertTrue((int) Math.ceil(.04 * (armor.getBaseProtection() + armor.getProtection(test, new NullDamageCause(DamageType.CACTUS)))) == 1);
}