AuditEvent { public static AuditEventType getAuditEventTypeFromFecType(int fcEvent) { AuditEventType auditEventType; switch (fcEvent) { case FormEntryController.EVENT_BEGINNING_OF_FORM: auditEventType = AuditEventType.BEGINNING_OF_FORM; break; case FormEntryController.EVENT_GROUP: auditEventType = AuditEventType.GROUP; break; case FormEntryController.EVENT_REPEAT: auditEventType = AuditEventType.REPEAT; break; case FormEntryController.EVENT_PROMPT_NEW_REPEAT: auditEventType = AuditEventType.PROMPT_NEW_REPEAT; break; case FormEntryController.EVENT_END_OF_FORM: auditEventType = AuditEventType.END_OF_FORM; break; default: auditEventType = AuditEventType.UNKNOWN_EVENT_TYPE; } return auditEventType; } AuditEvent(long start, AuditEventType auditEventType);  AuditEvent(long start, AuditEventType auditEventType,  boolean isTrackingLocationsEnabled, boolean isTrackingChangesEnabled);  AuditEvent(long start, AuditEventType auditEventType, boolean isTrackingLocationsEnabled,
                      boolean isTrackingChangesEnabled, FormIndex formIndex, String oldValue); boolean isIntervalAuditEventType(); void setEnd(long endTime); boolean isEndTimeSet(); AuditEventType getAuditEventType(); FormIndex getFormIndex(); boolean hasNewAnswer(); boolean isLocationAlreadySet(); void setLocationCoordinates(String latitude, String longitude, String accuracy); void recordValueChange(String newValue); @NonNull String toString(); static AuditEventType getAuditEventTypeFromFecType(int fcEvent);  }
@Test public void getAuditEventTypeFromFecTypeTest() { assertEquals(BEGINNING_OF_FORM, AuditEvent.getAuditEventTypeFromFecType(FormEntryController.EVENT_BEGINNING_OF_FORM)); assertEquals(GROUP, AuditEvent.getAuditEventTypeFromFecType(FormEntryController.EVENT_GROUP)); assertEquals(REPEAT, AuditEvent.getAuditEventTypeFromFecType(FormEntryController.EVENT_REPEAT)); assertEquals(PROMPT_NEW_REPEAT, AuditEvent.getAuditEventTypeFromFecType(FormEntryController.EVENT_PROMPT_NEW_REPEAT)); assertEquals(END_OF_FORM, AuditEvent.getAuditEventTypeFromFecType(FormEntryController.EVENT_END_OF_FORM)); assertEquals(UNKNOWN_EVENT_TYPE, AuditEvent.getAuditEventTypeFromFecType(100)); }