@Test public void storeAndQueryDataFilteringByOutputFields() throws Exception { ClientId client = ClientId.create( "XTEE-CI-XM", "GOV", "00000001", "System1"); storeFullOperationalDataRecords(1, 1474968960L); OperationalDataRecords result = queryRecords(1474968960L, 1474968980L, client, null, Sets.newHashSet("requestInTs", "securityServerInternalIp", "securityServerType")); assertEquals(1, result.size()); OperationalDataRecord record = result.getRecords().get(0); assertNotNull(record.getRequestInTs()); assertEquals(14749689780000L, record.getRequestInTs().longValue()); assertNull(record.getSecurityServerInternalIp()); assertEquals(OpMonitoringData.SecurityServerType.CLIENT, record.getSecurityServerType()); assertNull(record.getId()); assertNull(record.getMonitoringDataTs()); assertNull(record.getMessageId()); assertNull(record.getMessageProtocolVersion()); assertNull(record.getSucceeded()); result = queryRecords(1474968960L, 1474968980L, null, null, Sets.newHashSet("requestInTs", "securityServerInternalIp", "securityServerType")); assertEquals(1, result.size()); record = result.getRecords().get(0); assertEquals("192.168.3.250", record.getSecurityServerInternalIp()); result = queryRecords(1474968960L, 1474968980L, client, null, Sets.newHashSet("soapFaultCode")); assertEquals(1, result.size()); final OperationalDataRecord r = result.getRecords().get(0); OperationalDataOutputSpecFields.OUTPUT_FIELDS.forEach(i -> { try { Field field = OperationalDataRecord.class.getDeclaredField(i); field.setAccessible(true); assertNull(field.get(r)); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException("Internal error (" + i + ")", e); } }); }
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();   }