@Test public void testClone() { final Ammunition clone = (Ammunition) ammunition1.clone(); assertEquals(ammunition1.amount, clone.amount); assertEquals(ammunition1.properties, clone.properties); assertNotSame(ammunition1, clone); final Ammunition clone2 = (Ammunition) ammunition2.clone(); assertEquals(ammunition2.amount, clone2.amount); assertEquals(ammunition2.properties, clone2.properties); assertNotSame(ammunition2, clone2); }
@Override public Item clone() { return new Ammunition((AmmunitionProperties) properties, amount); }
Ammunition extends AbstractEquipableItem { @Override public Item clone() { return new Ammunition((AmmunitionProperties) properties, amount); } }
Ammunition extends AbstractEquipableItem { @Override public Item clone() { return new Ammunition((AmmunitionProperties) properties, amount); } Ammunition(AmmunitionProperties properties, int amount); }
Ammunition extends AbstractEquipableItem { @Override public Item clone() { return new Ammunition((AmmunitionProperties) properties, amount); } Ammunition(AmmunitionProperties properties, int amount); @Override Item clone(); @Override void use(Character character); int getMinHit(); int getMaxHit(); int getDamage(); }
Ammunition extends AbstractEquipableItem { @Override public Item clone() { return new Ammunition((AmmunitionProperties) properties, amount); } Ammunition(AmmunitionProperties properties, int amount); @Override Item clone(); @Override void use(Character character); int getMinHit(); int getMaxHit(); int getDamage();  }