@Test public void storeAndQueryDataCausingOverflow() throws Exception { storeFullOperationalDataRecords(8, 1474968980L); storeFullOperationalDataRecords(17, 1474968981L); OperationalDataRecordManager.setMaxRecordsInPayload(10); OperationalDataRecords result = queryRecords(1474968980L, 1474968980L); assertEquals(8, result.size()); assertNull(result.getNextRecordsFrom()); OperationalDataRecordManager.setMaxRecordsInPayload(8); result = queryRecords(1474968980L, 1474968980L); assertEquals(8, result.size()); assertNull(result.getNextRecordsFrom()); OperationalDataRecordManager.setMaxRecordsInPayload(5); result = queryRecords(1474968980L, 1474968980L); assertEquals(8, result.size()); assertNull(result.getNextRecordsFrom()); OperationalDataRecordManager.setMaxRecordsInPayload(10); result = queryRecords(1474968980L, 1474968990L); assertEquals(25, result.size()); assertNull(result.getNextRecordsFrom()); storeFullOperationalDataRecords(1, 1474968985L); OperationalDataRecordManager.setMaxRecordsInPayload(8); result = queryRecords(1474968960L, 1474968990L); assertEquals(8, result.size()); assertNotNull(result.getNextRecordsFrom()); assertEquals(1474968981, result.getNextRecordsFrom().longValue()); OperationalDataRecordManager.setMaxRecordsInPayload(10); result = queryRecords(1474968960L, 1474968990L); assertEquals(25, result.size()); assertNotNull(result.getNextRecordsFrom()); assertEquals(1474968982L, result.getNextRecordsFrom().longValue()); OperationalDataRecordManager.setMaxRecordsInPayload(10); result = queryRecords(1474968981L, 1474968990L); assertEquals(17, result.size()); assertNotNull(result.getNextRecordsFrom()); assertEquals(1474968982L, result.getNextRecordsFrom().longValue()); }
static OperationalDataRecords queryRecords(long recordsFrom, long recordsTo) throws Exception { return queryRecords(recordsFrom, recordsTo, null, null, new HashSet<>()); }
OperationalDataRecordManager { static OperationalDataRecords queryRecords(long recordsFrom, long recordsTo) throws Exception { return queryRecords(recordsFrom, recordsTo, null, null, new HashSet<>()); } }
OperationalDataRecordManager { static OperationalDataRecords queryRecords(long recordsFrom, long recordsTo) throws Exception { return queryRecords(recordsFrom, recordsTo, null, null, new HashSet<>()); } private  OperationalDataRecordManager(); }
OperationalDataRecordManager { static OperationalDataRecords queryRecords(long recordsFrom, long recordsTo) throws Exception { return queryRecords(recordsFrom, recordsTo, null, null, new HashSet<>()); } private  OperationalDataRecordManager();  }
OperationalDataRecordManager { static OperationalDataRecords queryRecords(long recordsFrom, long recordsTo) throws Exception { return queryRecords(recordsFrom, recordsTo, null, null, new HashSet<>()); } private  OperationalDataRecordManager();   }