### Question:
MagicWandModel implements Cloneable { @SuppressWarnings("CloneDoesntDeclareCloneNotSupportedException") @Override public MagicWandModel clone() { try { MagicWandModel clone = (MagicWandModel) super.clone(); clone.plusSpectra = new ArrayList<double[]>(plusSpectra); clone.minusSpectra = new ArrayList<double[]>(minusSpectra); return clone; } catch (CloneNotSupportedException e) { throw new IllegalStateException(e); } } MagicWandModel(); @SuppressWarnings("CloneDoesntDeclareCloneNotSupportedException") @Override MagicWandModel clone(); void set(MagicWandModel other); String[] getBandNames(); void setBandNames(String[] bandNames); Mode getMode(); void setMode(Mode mode); Method getMethod(); Operator getOperator(); void setOperator(Operator operator); void setMethod(Method method); double getTolerance(); void setTolerance(double tolerance); double getMinTolerance(); void setMinTolerance(double minTolerance); double getMaxTolerance(); void setMaxTolerance(double maxTolerance); boolean isNormalize(); void setNormalize(boolean normalize); List<double[]> getPlusSpectra(); List<double[]> getMinusSpectra(); @Override boolean equals(Object o); @Override int hashCode(); static MagicWandModel fromXml(String xml); String toXml();  }### Answer:
@Test public void testClone() throws Exception { final MagicWandModel model = new MagicWandModel(); model.setTolerance(0.005); model.setMinTolerance(0.0); model.setMaxTolerance(0.01); model.setNormalize(true); model.setMode(MagicWandModel.Mode.PLUS); model.addSpectrum(1, 2, 3, 4, 5, 6); model.addSpectrum(2, 3, 4, 5, 6, 7); model.setMode(MagicWandModel.Mode.MINUS); model.addSpectrum(3, 4, 5, 6, 7, 8); model.addSpectrum(4, 5, 6, 7, 8, 9); final MagicWandModel modelCopy = model.clone(); assertEquals(model, modelCopy); }