AuditTask extends TypedTask { public void setAction(String action) { ActionType.valueOf(action); this.action = action; }  String getAction(); void setAction(String action); String getUserId(); void setUserId(String userId); String getDateTime(); void setDateTime(String dateTime); String getContentChecksum(); void setContentChecksum(String contentChecksum); String getContentMimetype(); void setContentMimetype(String contentMimetype); String getContentSize(); void setContentSize(String contentSize); String getContentRange(); void setContentRange(String contentRange); Map<String, String> getContentProperties(); void setContentProperties(Map<String, String> contentProperties); String getSpaceACLs(); void setSpaceACLs(String spaceACLs); String getStoreType(); void setStoreType(String storeType); String getSourceSpaceId(); void setSourceSpaceId(String sourceSpaceId); String getSourceContentId(); void setSourceContentId(String sourceContentId); @Override void readTask(Task task); @Override Task writeTask(); static final String ACTION_PROP; static final String USER_ID_PROP; static final String DATE_TIME_PROP; static final String CONTENT_CHECKSUM_PROP; static final String CONTENT_MIMETYPE_PROP; static final String CONTENT_SIZE_PROP; static final String CONTENT_RANGE_PROP; static final String CONTENT_PROPERTIES_PROP; static final String SPACE_ACLS_PROP; static final String STORE_TYPE_PROP; static final String SOURCE_SPACE_ID_PROP; static final String SOURCE_CONTENT_ID_PROP; }
@Test public void testAuditTaskNulls() { String action = AuditTask.ActionType.ADD_CONTENT.name(); AuditTask auditTask = new AuditTask(); auditTask.setAction(action); verifyEmptyAuditTask(auditTask, action); }
@Test public void testSetInvalidActionType() { AuditTask auditTask = new AuditTask(); try { auditTask.setAction("unknown-action"); fail("Exception expected when attempting to set an invalid action"); } catch (IllegalArgumentException e) { assertNotNull(e); } }