- *
- * @throws JsonParseException
- * @throws JsonMappingException
- * @throws IOException
- */
- @Test
- public void numericRangeQueryTest() throws JsonParseException, JsonMappingException, IOException {
-
- String field = "version";
- Integer greaterThanInt = 5;
- Integer lessThanInt = 100;
-
- ObjectMapper mapper = new ObjectMapper();
-
- // Generate a numeric range query using 'greater than or equal' and 'less
- // than or equal' operations.
- String numericRangeJson =
- "{ \"field\": \"" + field + "\", \"gte\": " + greaterThanInt + ", \"lte\": " + lessThanInt + "}";
- String numericRangeExpectedES =
- "{\"range\": {\"" + field + "\": {\"gte\": " + greaterThanInt + ", \"lte\": " + lessThanInt + "}}}";
-
- // Validate that the query is marshalled correctly to the POJO and that
- // the generated ElasticSearch syntax looks as expected.
- RangeQuery numericRangeQuery = mapper.readValue(numericRangeJson, RangeQuery.class);
+ *
+ * @throws JsonParseException
+ * @throws JsonMappingException
+ * @throws IOException
+ */
+ @Test
+ public void numericRangeQueryTest() throws JsonParseException, JsonMappingException, IOException {
+
+ String field = "version";
+ Integer greaterThanInt = 5;
+ Integer lessThanInt = 100;
+
+ ObjectMapper mapper = new ObjectMapper();
+
+ // Generate a numeric range query using 'greater than or equal' and 'less
+ // than or equal' operations.
+ String numericRangeJson =
+ "{ \"field\": \"" + field + "\", \"gte\": " + greaterThanInt + ", \"lte\": " + lessThanInt + "}";
+ String numericRangeExpectedES =
+ "{\"range\": {\"" + field + "\": {\"gte\": " + greaterThanInt + ", \"lte\": " + lessThanInt + "}}}";
+
+ // Validate that the query is marshalled correctly to the POJO and that
+ // the generated ElasticSearch syntax looks as expected.
+ RangeQuery numericRangeQuery = mapper.readValue(numericRangeJson, RangeQuery.class);