### Question:
Potion { @Deprecated public static Potion fromDamage(int damage) { PotionType type = PotionType.getByDamageValue(damage & POTION_BIT); Potion potion; if (type == null || (type == PotionType.WATER && damage != 0)) { potion = new Potion(damage & NAME_BIT); } else { int level = (damage & TIER_BIT) >> TIER_SHIFT; level++; potion = new Potion(type, level); } if ((damage & SPLASH_BIT) > 0) { potion = potion.splash(); } if ((damage & EXTENDED_BIT) > 0) { potion = potion.extend(); } return potion; } Potion(PotionType type); @SuppressWarnings("javadoc") @Deprecated  Potion(PotionType type, Tier tier); @SuppressWarnings("javadoc") @Deprecated  Potion(PotionType type, Tier tier, boolean splash); @SuppressWarnings("javadoc") @Deprecated  Potion(PotionType type, Tier tier, boolean splash, boolean extended);  Potion(PotionType type, int level); @Deprecated  Potion(PotionType type, int level, boolean splash); @Deprecated  Potion(PotionType type, int level, boolean splash, boolean extended);  Potion(int name); Potion splash(); Potion extend(); void apply(ItemStack to); void apply(LivingEntity to); @Override boolean equals(Object obj); Collection<PotionEffect> getEffects(); int getLevel(); @Deprecated Tier getTier(); PotionType getType(); boolean hasExtendedDuration(); @Override int hashCode(); boolean isSplash(); void setHasExtendedDuration(boolean isExtended); void setSplash(boolean isSplash); @Deprecated void setTier(Tier tier); void setType(PotionType type); void setLevel(int level); @Deprecated short toDamageValue(); ItemStack toItemStack(int amount); @Deprecated static Potion fromDamage(int damage); static Potion fromItemStack(ItemStack item); static PotionBrewer getBrewer(); static void setPotionBrewer(PotionBrewer other); @Deprecated int getNameId();  }### Answer:
@Test public void fromDamage() { Potion potion = Potion.fromDamage(PotionType.POISON.getDamageValue()); assertTrue(potion.getType() == PotionType.POISON); potion = Potion.fromDamage(PotionType.POISON.getDamageValue() | SPLASH_BIT); assertTrue(potion.getType() == PotionType.POISON && potion.isSplash()); potion = Potion.fromDamage(0x25 ); assertTrue(potion.getType() == PotionType.INSTANT_HEAL && potion.getLevel() == 2); }