private static TimelineEntity GenerateEntity() { TimelineEntity entity = new TimelineEntity(); entity.SetEntityId("entity id"); entity.SetEntityType("entity type"); entity.SetStartTime(Runtime.CurrentTimeMillis()); for (int i = 0; i < 2; ++i) { TimelineEvent @event = new TimelineEvent(); @event.SetTimestamp(Runtime.CurrentTimeMillis()); @event.SetEventType("test event type " + i); @event.AddEventInfo("key1", "val1"); @event.AddEventInfo("key2", "val2"); entity.AddEvent(@event); } entity.AddRelatedEntity("test ref type 1", "test ref id 1"); entity.AddRelatedEntity("test ref type 2", "test ref id 2"); entity.AddPrimaryFilter("pkey1", "pval1"); entity.AddPrimaryFilter("pkey2", "pval2"); entity.AddOtherInfo("okey1", "oval1"); entity.AddOtherInfo("okey2", "oval2"); entity.SetDomainId("domain id 1"); return(entity); }