### Question:
Task implements Cloneable, PublicCloneable, Serializable { public int getSubtaskCount() { return this.subtasks.size(); } Task(String description, TimePeriod duration);  Task(String description, Date start, Date end); String getDescription(); void setDescription(String description); TimePeriod getDuration(); void setDuration(TimePeriod duration); Double getPercentComplete(); void setPercentComplete(Double percent); void setPercentComplete(double percent); void addSubtask(Task subtask); void removeSubtask(Task subtask); int getSubtaskCount(); Task getSubtask(int index); @Override boolean equals(Object object); @Override Object clone();  }### Answer:
@Test public void testGetSubTaskCount() { Task t1 = new Task("T", new Date(100), new Date(200)); assertEquals(0, t1.getSubtaskCount()); t1.addSubtask(new Task("S1", new Date(100), new Date(110))); assertEquals(1, t1.getSubtaskCount()); Task s2 = new Task("S2", new Date(111), new Date(120)); t1.addSubtask(s2); assertEquals(2, t1.getSubtaskCount()); t1.addSubtask(new Task("S3", new Date(121), new Date(130))); assertEquals(3, t1.getSubtaskCount()); t1.removeSubtask(s2); assertEquals(2, t1.getSubtaskCount()); }