@Test public void testClone() { final Parchment clone1 = (Parchment) parchment1.clone(); assertEquals(clone1.getAmount(), parchment1.getAmount()); assertEquals(clone1.getSpell(), parchment1.getSpell()); assertEquals(clone1.properties, parchment1.properties); assertNotSame(clone1, parchment1); final Parchment clone2 = (Parchment) parchment2.clone(); assertEquals(clone2.getAmount(), parchment2.getAmount()); assertEquals(clone2.getSpell(), parchment2.getSpell()); assertEquals(clone2.properties, parchment2.properties); assertNotSame(clone2, parchment2); }
@Override public Item clone() { return new Parchment((ParchmentProperties) properties, amount); }
Parchment extends ConsumableItem { @Override public Item clone() { return new Parchment((ParchmentProperties) properties, amount); } }
Parchment extends ConsumableItem { @Override public Item clone() { return new Parchment((ParchmentProperties) properties, amount); } Parchment(ParchmentProperties properties, int amount); }
Parchment extends ConsumableItem { @Override public Item clone() { return new Parchment((ParchmentProperties) properties, amount); } Parchment(ParchmentProperties properties, int amount); @Override Item clone(); @Override void use(Character character); Spell getSpell(); }
Parchment extends ConsumableItem { @Override public Item clone() { return new Parchment((ParchmentProperties) properties, amount); } Parchment(ParchmentProperties properties, int amount); @Override Item clone(); @Override void use(Character character); Spell getSpell();  }