String returnedName = path.get("name");
String returnedType = path.get("type");
String returnedDescription = path.get("description");
String returnedUrl = path.get("url");
Attachment mockAttachment = mockTaskAttachments.get(0);
assertEquals(mockAttachment.getId(), returnedId);
assertEquals(mockAttachment.getTaskId(), returnedTaskId);
assertEquals(mockAttachment.getName(), returnedName);
assertEquals(mockAttachment.getType(), returnedType);
assertEquals(mockAttachment.getDescription(), returnedDescription);
if (urlExist) {
assertEquals(mockAttachment.getUrl(), returnedUrl);
}
}