public static final Instant SAMPLE_DATE = new DateTime(1994, 11, 05, 13, 15, 30, 111, DateTimeZone.UTC).toInstant();
private final AuditRecordsJsonParser parser = new AuditRecordsJsonParser();
@Test
public void testParseValidResponse() throws Exception {
final AuditRecordsData auditRecordsData = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/auditRecord/valid.json"));
assertThat(auditRecordsData.getOffset(), is(0));
assertThat(auditRecordsData.getLimit(), is(1000));
assertThat(auditRecordsData.getTotal(), is(2));
final Iterator<AuditRecord> recordsIterator = auditRecordsData.getRecords().iterator();
final AuditRecord firstRecord = recordsIterator.next();
assertThat(firstRecord.getSummary(), is("User added to group"));
assertThat(firstRecord.getRemoteAddress(), is("127.0.0.1"));
assertThat(firstRecord.getCreated().toInstant(), is(SAMPLE_DATE));