### Question:
TaskKey extends JobKey implements Comparable<Object> { public String toString() { return super.toString() + Constants.SEP + getTaskId(); } @JsonCreator  TaskKey(@JsonProperty("jobId") JobKey jobKey, @JsonProperty("taskId") String taskId); String getTaskId(); String toString(); @Override int compareTo(Object other); @Override boolean equals(Object other); @Override int hashCode();  }### Answer:
@Test public void testToString() { JobKey jKey = new JobKey("test@local", "testuser", "app", 1234L, "job_20120101000000_1111"); TaskKey key = new TaskKey(jKey, "m_001"); String expected = jKey.toString() + Constants.SEP + "m_001"; assertEquals(expected, key.toString()); }