### Question:
TaskStatusInfo { public void setTaskConfig(Map<String, Object> taskConfig) { try { final String tmp = SearchUtils.convertJsonMapToString(taskConfig); this.taskConfigSerialized = tmp.trim().isEmpty() ? null : tmp; } catch (IOException e) { throw new RuntimeException(e); } }  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 setTaskConfig() throws IOException { TaskStatusInfo tested = new TaskStatusInfo(); tested.taskConfigSerialized = "aaaa"; tested.setTaskConfig(null); Assert.assertNull(tested.taskConfigSerialized); tested.setTaskConfig(new HashMap<String, Object>()); Assert.assertEquals("{}", tested.taskConfigSerialized); Map<String, Object> m = new HashMap<String, Object>(); m.put("mk", "mv"); tested.setTaskConfig(m); TestUtils.assertJsonContent("{\"mk\":\"mv\"}", tested.taskConfigSerialized); }