### Question:
TaskStatusInfo { public void appendProcessingLog(String message) { if (message == null || message.trim().length() == 0) return; if (processingLog == null || processingLog.isEmpty()) { processingLog = message; } else { processingLog = processingLog + "\n" + message; } if (processingLog.length() > 65000) { processingLog = processingLog.substring(processingLog.length() - 65000); } }  void appendProcessingLog(String message); boolean startTaskExecution(String executionNodeId); @JsonIgnore Map<String, Object> getTaskConfig(); void setTaskConfig(Map<String, Object> taskConfig); String getId(); void setId(String id); String getTaskType(); void setTaskType(String taskType); String getTaskConfigSerialized(); void setTaskConfigSerialized(String taskConfigSerialized); Date getTaskCreatedAt(); void setTaskCreatedAt(Date taskCreatedAt); Date getLastRunStartedAt(); void setLastRunStartedAt(Date lastRunStartedAt); int getRunCount(); void setRunCount(int runCount); Date getLastRunFinishedAt(); void setLastRunFinishedAt(Date lastRunFinishedAt); String getExecutionNodeId(); void setExecutionNodeId(String executionNodeId); TaskStatus getTaskStatus(); void setTaskStatus(TaskStatus taskStatus); String getProcessingLog(); void setProcessingLog(String processingLog); boolean isCancelRequested(); void setCancelRequested(boolean cancelRequested); long getHeartbeat(); void setHeartbeat(long heartbeat); @Override String toString(); static final int FAILOVER_MAX_NUM; }### Answer:
@Test public void appendProcessingLog() { TaskStatusInfo tested = new TaskStatusInfo(); Assert.assertNull(tested.processingLog); tested.appendProcessingLog(null); Assert.assertNull(tested.processingLog); tested.appendProcessingLog(" "); Assert.assertNull(tested.processingLog); tested.appendProcessingLog("row1"); Assert.assertEquals("row1", tested.processingLog); tested.appendProcessingLog("row2"); Assert.assertEquals("row1\nrow2", tested.processingLog); tested.appendProcessingLog(null); Assert.assertEquals("row1\nrow2", tested.processingLog); tested.appendProcessingLog(" "); Assert.assertEquals("row1\nrow2", tested.processingLog); tested.appendProcessingLog("row3"); Assert.assertEquals("row1\nrow2\nrow3", tested.processingLog); tested.processingLog = "bbb"; StringBuilder sb = new StringBuilder(); for (int i = 0; i < 65000; i++) { sb.append("a"); } tested.appendProcessingLog(sb.toString()); Assert.assertEquals(65000, tested.processingLog.length()); Assert.assertEquals('a', tested.processingLog.charAt(0)); }