@Test public void storeAndQueryDataFilteringByClientAndServiceProvider() throws Exception { ClientId client = ClientId.create( "XTEE-CI-XM", "GOV", "00000001", "System1"); ClientId unknownClient = ClientId.create( "XTEE-CI-XM", "GOV", "00000001", "UNKNOWN"); ClientId serviceProvider = ClientId.create( "XTEE-CI-XM", "GOV", "00000000", "Center"); ClientId unknownServiceProvider = ClientId.create( "XTEE-CI-XM", "GOV", "00000000", "UNKNOWN"); ClientId member = ClientId.create("XTEE-CI-XM", "GOV", "00000011"); storeFullOperationalDataRecord(1474968960L, client, serviceProvider); storeFullOperationalDataRecord(1474968970L, client, serviceProvider); storeFullOperationalDataRecord(1474968980L, client, client); storeFullOperationalDataRecord(1474968980L, serviceProvider, client); storeFullOperationalDataRecord(1474968980L, serviceProvider, serviceProvider); storeFullOperationalDataRecord(1474968990L, client, member); storeFullOperationalDataRecord(1474968991L, member, member); storeFullOperationalDataRecord(1474968992L, member, client); OperationalDataRecords result = queryRecords(1474968960L, 1474968980L, client); assertEquals(4, result.size()); result = queryRecords(1474968960L, 1474968980L, unknownClient); assertEquals(0, result.size()); result = queryRecords(1474968960L, 1474968980L, client, serviceProvider, new HashSet<>()); assertEquals(2, result.size()); result = queryRecords(1474968960L, 1474968980L, client, unknownServiceProvider, new HashSet<>()); assertEquals(0, result.size()); result = queryRecords(1474968960L, 1474968980L, unknownClient, serviceProvider, new HashSet<>()); assertEquals(0, result.size()); result = queryRecords(1474968960L, 1474968980L, unknownClient, unknownServiceProvider, new HashSet<>()); assertEquals(0, result.size()); result = queryRecords(1474968960L, 1474968980L, client, client, new HashSet<>()); assertEquals(2, result.size()); result = queryRecords(1474968960L, 1474968980L, null, serviceProvider, new HashSet<>()); assertEquals(3, result.size()); result = queryRecords(1474968960L, 1474968980L, null, unknownServiceProvider, new HashSet<>()); assertEquals(0, result.size()); result = queryRecords(1474968990L, 1474968993L, member); assertEquals(3, result.size()); result = queryRecords(1474968990L, 1474968993L, client, member, new HashSet<>()); assertEquals(1, result.size()); }
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();   }