@Test public void checkInvalidSearchCriteriaOutputFields() throws Exception { thrown.expect(CodedException.class); thrown.expectMessage( "Unknown output field in search criteria: UNKNOWN-FIELD"); OperationalDataRequestHandler.checkOutputFields(Sets.newHashSet( "monitoringDataTs", "UNKNOWN-FIELD")); }
protected static void checkOutputFields(Set<String> outputFields) { for (String field : outputFields) { if (!OUTPUT_FIELDS.contains(field)) { throw new CodedException(X_INVALID_REQUEST, "Unknown output field in search criteria: " + field) .withPrefix(CLIENT_X); } } }
OperationalDataRequestHandler extends QueryRequestHandler { protected static void checkOutputFields(Set<String> outputFields) { for (String field : outputFields) { if (!OUTPUT_FIELDS.contains(field)) { throw new CodedException(X_INVALID_REQUEST, "Unknown output field in search criteria: " + field) .withPrefix(CLIENT_X); } } } }
OperationalDataRequestHandler extends QueryRequestHandler { protected static void checkOutputFields(Set<String> outputFields) { for (String field : outputFields) { if (!OUTPUT_FIELDS.contains(field)) { throw new CodedException(X_INVALID_REQUEST, "Unknown output field in search criteria: " + field) .withPrefix(CLIENT_X); } } }  }
OperationalDataRequestHandler extends QueryRequestHandler { protected static void checkOutputFields(Set<String> outputFields) { for (String field : outputFields) { if (!OUTPUT_FIELDS.contains(field)) { throw new CodedException(X_INVALID_REQUEST, "Unknown output field in search criteria: " + field) .withPrefix(CLIENT_X); } } }  @Override void handle(SoapMessageImpl requestSoap, OutputStream out,
            Consumer<String> contentTypeCallback); }
OperationalDataRequestHandler extends QueryRequestHandler { protected static void checkOutputFields(Set<String> outputFields) { for (String field : outputFields) { if (!OUTPUT_FIELDS.contains(field)) { throw new CodedException(X_INVALID_REQUEST, "Unknown output field in search criteria: " + field) .withPrefix(CLIENT_X); } } }  @Override void handle(SoapMessageImpl requestSoap, OutputStream out,
            Consumer<String> contentTypeCallback);  }