{
LoginContext login = ApplicationCallbackHandler.login("audituser1", "user1");
try
{
AuditMappedHome home = getAuditMappedEJB();
AuditMapped audit = home.findByPrimaryKey(id);
if (user.equals(audit.getCreatedBy()) == false)
return "Expected getter to return user from test";
long time = audit.getCreatedTime().getTime();
if (time < beginTime || time > endTime)
return "Expected getter to return time from test";