### Question:
SportType extends IdObject implements Nameable, Cloneable { @Override public SportType clone() { try { SportType clone = (SportType) super.clone(); if (this.sportSubTypeList != null) { clone.sportSubTypeList = new IdObjectList<>(); this.sportSubTypeList.forEach(subType -> clone.sportSubTypeList.set(subType.clone())); } if (this.equipmentList != null) { clone.equipmentList = new IdObjectList<>(); this.equipmentList.forEach(equipment -> clone.equipmentList.set(equipment.clone())); } return clone; } catch (CloneNotSupportedException ex) { throw new AssertionError(); } } SportType(int id); @Override String getName(); void setName(String name); boolean isRecordDistance(); void setRecordDistance(boolean recordDistance); SpeedMode getSpeedMode(); void setSpeedMode(SpeedMode speedMode); String getIcon(); void setIcon(String icon); Color getColor(); void setColor(Color color); IdObjectList<SportSubType> getSportSubTypeList(); IdObjectList<Equipment> getEquipmentList(); @Override SportType clone(); @Override String toString();  }### Answer:
@Test public void testClone() { SportType clone = type.clone(); assertNotNull(clone); assertFalse(type == clone); assertEquals(type.getId(), clone.getId()); assertEquals(type.getName(), clone.getName()); assertEquals(type.getSpeedMode(), clone.getSpeedMode()); assertEquals(type.getIcon(), clone.getIcon()); assertEquals(type.getColor(), clone.getColor()); assertEquals(type.isRecordDistance(), clone.isRecordDistance()); assertEquals(type.getSportSubTypeList().size(), clone.getSportSubTypeList().size()); assertEquals(type.getSportSubTypeList().getByID(2).getName(), clone.getSportSubTypeList().getByID(2).getName()); assertEquals(type.getSportSubTypeList().getByID(3).getName(), clone.getSportSubTypeList().getByID(3).getName()); type.setName("Stuff"); type.setSpeedMode(SpeedMode.PACE); type.setIcon("noicon.png"); type.setColor(Color.PINK); type.getSportSubTypeList().removeByID(3); type.getSportSubTypeList().getByID(2).setName("Road123"); type.getEquipmentList().removeByID(1); type.getEquipmentList().getByID(2).setName("Litespeed Icon"); assertFalse(type.getName().equals(clone.getName())); assertFalse(type.getSpeedMode().equals(clone.getSpeedMode())); assertFalse(type.getIcon().equals(clone.getIcon())); assertFalse(type.getColor().equals(clone.getColor())); assertTrue(type.getSportSubTypeList().size() != clone.getSportSubTypeList().size()); assertFalse(type.getSportSubTypeList().getByID(2).getName().equals(clone.getSportSubTypeList().getByID(2).getName())); assertTrue(type.getEquipmentList().size() != clone.getEquipmentList().size()); assertNull(type.getEquipmentList().getByID(1)); assertNotNull(clone.getEquipmentList().getByID(1)); assertFalse(type.getEquipmentList().getByID(2).getName().equals(clone.getEquipmentList().getByID(2).getName())); }