### Question:
Exercise implements Serializable { public String getName() { return this.name; } Exercise();  Exercise(String name);  Exercise(String name, String courseName); void finalizeDeserialization(); void setDeadlineString(String deadline); int getId(); void setId(int id); String getName(); void setName(String name); boolean isLocked(); void setLocked(boolean locked); String getDeadlineDescription(); void setDeadlineDescription(String deadlineDescription); boolean hasDeadlinePassed(); boolean hasDeadlinePassedAt(Date time); ExerciseKey getKey(); Course getCourse(); void setCourse(Course course); String getCourseName(); void setCourseName(String courseName); String getDownloadUrl(); void setDownloadUrl(String downloadAddress); String getReturnUrl(); void setSolutionDownloadUrl(String solutionDownloadUrl); String getSolutionDownloadUrl(); void setReturnUrl(String returnAddress); Date getDeadline(); void setDeadline(Date deadline); boolean isReturnable(); void setReturnable(boolean returnable); boolean requiresReview(); void setRequiresReview(boolean requiresReview); boolean isAttempted(); void setAttempted(boolean attempted); boolean isCompleted(); void setCompleted(boolean completed); boolean isReviewed(); void setReviewed(boolean reviewed); boolean isAllReviewPointsGiven(); void setAllReviewPointsGiven(boolean allReviewPointsGiven); String getChecksum(); void setChecksum(String checksum); void setOldChecksum(String oldChecksum); String getOldChecksum(); Integer getMemoryLimit(); void setMemoryLimit(Integer memoryLimit); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); Project getProject(); void setProject(Project project); void setUpdateAvailable(boolean updateAvailable); boolean isUpdateAvailable(); boolean shouldBeUpdated(); boolean isDownloadable();  }### Answer:
@Test public void constructorSetsNameFieldCorrectly() { exercise = new Exercise("test name"); assertEquals("test name", exercise.getName()); }