taskService.createAttachment(IMAGE_PNG, task.getId(), null, IMAGE_NAME, IMAGE_DESC, IMAGE_URL);
// now there is a task event created
List<Event> events = taskService.getTaskEvents(task.getId());
assertEquals(1, events.size());
Event event = events.get(0);
assertEquals(1, event.getMessageParts().size());
assertEquals(IMAGE_NAME, event.getMessageParts().get(0));
assertEquals(task.getId(), event.getTaskId());
assertEquals(ACTION_ADD_ATTACHMENT, event.getAction());
assertEquals(IMAGE_NAME, event.getMessage());
assertEquals(null, event.getProcessInstanceId());
assertNotNull(event.getTime().getTime() <= ClockUtil.getCurrentTime().getTime());
assertNoCommentsForTask();
}