@Test public void getVulnerabilyAcrossAppAndEnvTest_Exception() throws Exception { mockStatic(PacHttpUtils.class); when(PacHttpUtils.doHttpPost(anyString(), anyString())).thenThrow(new Exception()); ReflectionTestUtils.setField(vulnerabilityRepository, "esUrl", "dummyEsURL"); assertThatThrownBy(() -> vulnerabilityRepository.getVulnerabilyAcrossAppAndEnv("ag", "tags.Application.keyword", "", "parent", "3")).isInstanceOf(Exception.class); }
public List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application, String parentType, String severity) throws Exception { List<Map<String, Object>> vulnApplications = new ArrayList<>(); StringBuilder urlToQuery = new StringBuilder(esUrl).append("/").append(assetGroup); urlToQuery.append("/").append(parentType); urlToQuery.append("/").append(SEARCH); StringBuilder requestBody = new StringBuilder( "{\"size\":0,\"query\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}}"); if (StringUtils.isNotEmpty(application)) { requestBody.append(",{\"match\":{\"tags.Application.keyword\":\""); requestBody.append(application); requestBody.append("\"}}"); } requestBody.append("]}},\"aggs\":{\"apps\":{\"terms\":{\"field\":\""); requestBody.append(filter); requestBody.append( "\",\"size\":10000},\"aggs\":{\"vulns\":{\"children\":{\"type\":\"vulninfo\"},\"aggs\":{\"NAME\":{\"filters\":{\"filters\":{\""); if (StringUtils.isNotEmpty(severity)) { requestBody.append("S").append(severity); requestBody.append("\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}},{\"term\":{\"severitylevel.keyword\":") .append(severity).append("}}]}}"); } else { requestBody.append( "S3\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":3}},{\"match\":{\"latest\":true}}]}},\"S4\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":4}},{\"match\":{\"latest\":true}}]}},\"S5\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":5}},{\"match\":{\"latest\":true}}]}}"); } requestBody.append("}}}}}}}}}"); String responseJson = ""; try { responseJson = PacHttpUtils.doHttpPost(urlToQuery.toString(), requestBody.toString()); } catch (Exception e) { LOGGER.error("Error in getVulnerabilyAcrossAppAndEnv from ES", e); throw e; } JsonParser jsonParser = new JsonParser(); JsonObject resultJson = (JsonObject) jsonParser.parse(responseJson); JsonObject aggsJson = (JsonObject) jsonParser.parse(resultJson.get(AGGREGATIONS).toString()); JsonArray outerBuckets = aggsJson.getAsJsonObject("apps").getAsJsonArray(BUCKETS); if (outerBuckets.size() > 0) { for (int i = 0; i < outerBuckets.size(); i++) { String appName = outerBuckets.get(i).getAsJsonObject().get("key").getAsString(); List<Map<String, Object>> severityInfo = getSeverityInfo(outerBuckets.get(i).getAsJsonObject() .getAsJsonObject(VULN).getAsJsonObject("NAME").getAsJsonObject(BUCKETS), severity); Map<String, Object> applicationInfo = new HashMap<>(); if (filter.equals(TAGS_APPS)) { applicationInfo.put(APPS, appName); } else { applicationInfo.put("environment", appName); } applicationInfo.put("severityinfo", severityInfo); if (StringUtils.isEmpty(severity)) { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(1).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(2).get(COUNT).toString())); } else { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString())); } vulnApplications.add(applicationInfo); } } return vulnApplications; }
VulnerabilityRepository implements Constants { public List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application, String parentType, String severity) throws Exception { List<Map<String, Object>> vulnApplications = new ArrayList<>(); StringBuilder urlToQuery = new StringBuilder(esUrl).append("/").append(assetGroup); urlToQuery.append("/").append(parentType); urlToQuery.append("/").append(SEARCH); StringBuilder requestBody = new StringBuilder( "{\"size\":0,\"query\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}}"); if (StringUtils.isNotEmpty(application)) { requestBody.append(",{\"match\":{\"tags.Application.keyword\":\""); requestBody.append(application); requestBody.append("\"}}"); } requestBody.append("]}},\"aggs\":{\"apps\":{\"terms\":{\"field\":\""); requestBody.append(filter); requestBody.append( "\",\"size\":10000},\"aggs\":{\"vulns\":{\"children\":{\"type\":\"vulninfo\"},\"aggs\":{\"NAME\":{\"filters\":{\"filters\":{\""); if (StringUtils.isNotEmpty(severity)) { requestBody.append("S").append(severity); requestBody.append("\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}},{\"term\":{\"severitylevel.keyword\":") .append(severity).append("}}]}}"); } else { requestBody.append( "S3\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":3}},{\"match\":{\"latest\":true}}]}},\"S4\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":4}},{\"match\":{\"latest\":true}}]}},\"S5\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":5}},{\"match\":{\"latest\":true}}]}}"); } requestBody.append("}}}}}}}}}"); String responseJson = ""; try { responseJson = PacHttpUtils.doHttpPost(urlToQuery.toString(), requestBody.toString()); } catch (Exception e) { LOGGER.error("Error in getVulnerabilyAcrossAppAndEnv from ES", e); throw e; } JsonParser jsonParser = new JsonParser(); JsonObject resultJson = (JsonObject) jsonParser.parse(responseJson); JsonObject aggsJson = (JsonObject) jsonParser.parse(resultJson.get(AGGREGATIONS).toString()); JsonArray outerBuckets = aggsJson.getAsJsonObject("apps").getAsJsonArray(BUCKETS); if (outerBuckets.size() > 0) { for (int i = 0; i < outerBuckets.size(); i++) { String appName = outerBuckets.get(i).getAsJsonObject().get("key").getAsString(); List<Map<String, Object>> severityInfo = getSeverityInfo(outerBuckets.get(i).getAsJsonObject() .getAsJsonObject(VULN).getAsJsonObject("NAME").getAsJsonObject(BUCKETS), severity); Map<String, Object> applicationInfo = new HashMap<>(); if (filter.equals(TAGS_APPS)) { applicationInfo.put(APPS, appName); } else { applicationInfo.put("environment", appName); } applicationInfo.put("severityinfo", severityInfo); if (StringUtils.isEmpty(severity)) { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(1).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(2).get(COUNT).toString())); } else { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString())); } vulnApplications.add(applicationInfo); } } return vulnApplications; } }
VulnerabilityRepository implements Constants { public List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application, String parentType, String severity) throws Exception { List<Map<String, Object>> vulnApplications = new ArrayList<>(); StringBuilder urlToQuery = new StringBuilder(esUrl).append("/").append(assetGroup); urlToQuery.append("/").append(parentType); urlToQuery.append("/").append(SEARCH); StringBuilder requestBody = new StringBuilder( "{\"size\":0,\"query\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}}"); if (StringUtils.isNotEmpty(application)) { requestBody.append(",{\"match\":{\"tags.Application.keyword\":\""); requestBody.append(application); requestBody.append("\"}}"); } requestBody.append("]}},\"aggs\":{\"apps\":{\"terms\":{\"field\":\""); requestBody.append(filter); requestBody.append( "\",\"size\":10000},\"aggs\":{\"vulns\":{\"children\":{\"type\":\"vulninfo\"},\"aggs\":{\"NAME\":{\"filters\":{\"filters\":{\""); if (StringUtils.isNotEmpty(severity)) { requestBody.append("S").append(severity); requestBody.append("\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}},{\"term\":{\"severitylevel.keyword\":") .append(severity).append("}}]}}"); } else { requestBody.append( "S3\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":3}},{\"match\":{\"latest\":true}}]}},\"S4\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":4}},{\"match\":{\"latest\":true}}]}},\"S5\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":5}},{\"match\":{\"latest\":true}}]}}"); } requestBody.append("}}}}}}}}}"); String responseJson = ""; try { responseJson = PacHttpUtils.doHttpPost(urlToQuery.toString(), requestBody.toString()); } catch (Exception e) { LOGGER.error("Error in getVulnerabilyAcrossAppAndEnv from ES", e); throw e; } JsonParser jsonParser = new JsonParser(); JsonObject resultJson = (JsonObject) jsonParser.parse(responseJson); JsonObject aggsJson = (JsonObject) jsonParser.parse(resultJson.get(AGGREGATIONS).toString()); JsonArray outerBuckets = aggsJson.getAsJsonObject("apps").getAsJsonArray(BUCKETS); if (outerBuckets.size() > 0) { for (int i = 0; i < outerBuckets.size(); i++) { String appName = outerBuckets.get(i).getAsJsonObject().get("key").getAsString(); List<Map<String, Object>> severityInfo = getSeverityInfo(outerBuckets.get(i).getAsJsonObject() .getAsJsonObject(VULN).getAsJsonObject("NAME").getAsJsonObject(BUCKETS), severity); Map<String, Object> applicationInfo = new HashMap<>(); if (filter.equals(TAGS_APPS)) { applicationInfo.put(APPS, appName); } else { applicationInfo.put("environment", appName); } applicationInfo.put("severityinfo", severityInfo); if (StringUtils.isEmpty(severity)) { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(1).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(2).get(COUNT).toString())); } else { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString())); } vulnApplications.add(applicationInfo); } } return vulnApplications; }  }
VulnerabilityRepository implements Constants { public List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application, String parentType, String severity) throws Exception { List<Map<String, Object>> vulnApplications = new ArrayList<>(); StringBuilder urlToQuery = new StringBuilder(esUrl).append("/").append(assetGroup); urlToQuery.append("/").append(parentType); urlToQuery.append("/").append(SEARCH); StringBuilder requestBody = new StringBuilder( "{\"size\":0,\"query\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}}"); if (StringUtils.isNotEmpty(application)) { requestBody.append(",{\"match\":{\"tags.Application.keyword\":\""); requestBody.append(application); requestBody.append("\"}}"); } requestBody.append("]}},\"aggs\":{\"apps\":{\"terms\":{\"field\":\""); requestBody.append(filter); requestBody.append( "\",\"size\":10000},\"aggs\":{\"vulns\":{\"children\":{\"type\":\"vulninfo\"},\"aggs\":{\"NAME\":{\"filters\":{\"filters\":{\""); if (StringUtils.isNotEmpty(severity)) { requestBody.append("S").append(severity); requestBody.append("\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}},{\"term\":{\"severitylevel.keyword\":") .append(severity).append("}}]}}"); } else { requestBody.append( "S3\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":3}},{\"match\":{\"latest\":true}}]}},\"S4\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":4}},{\"match\":{\"latest\":true}}]}},\"S5\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":5}},{\"match\":{\"latest\":true}}]}}"); } requestBody.append("}}}}}}}}}"); String responseJson = ""; try { responseJson = PacHttpUtils.doHttpPost(urlToQuery.toString(), requestBody.toString()); } catch (Exception e) { LOGGER.error("Error in getVulnerabilyAcrossAppAndEnv from ES", e); throw e; } JsonParser jsonParser = new JsonParser(); JsonObject resultJson = (JsonObject) jsonParser.parse(responseJson); JsonObject aggsJson = (JsonObject) jsonParser.parse(resultJson.get(AGGREGATIONS).toString()); JsonArray outerBuckets = aggsJson.getAsJsonObject("apps").getAsJsonArray(BUCKETS); if (outerBuckets.size() > 0) { for (int i = 0; i < outerBuckets.size(); i++) { String appName = outerBuckets.get(i).getAsJsonObject().get("key").getAsString(); List<Map<String, Object>> severityInfo = getSeverityInfo(outerBuckets.get(i).getAsJsonObject() .getAsJsonObject(VULN).getAsJsonObject("NAME").getAsJsonObject(BUCKETS), severity); Map<String, Object> applicationInfo = new HashMap<>(); if (filter.equals(TAGS_APPS)) { applicationInfo.put(APPS, appName); } else { applicationInfo.put("environment", appName); } applicationInfo.put("severityinfo", severityInfo); if (StringUtils.isEmpty(severity)) { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(1).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(2).get(COUNT).toString())); } else { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString())); } vulnApplications.add(applicationInfo); } } return vulnApplications; }  List<Map<String, Object>> getAllVulnerabilities(List<String> vulnAssetsAffectedQids); List<Map<String, Object>> getAllVulnerabilitiesByAssetGroup(String assetGroup, String targetType,
			Map<String, Object> mustFilter, List<String> occurrenceFieldList, int from, int size,
			Map<String, Object> mustTermsFilter); List<Map<String, Object>> getDetailsByResourceId(String assetGroup, Map<String, Object> mustFilter,
			List<String> resourceFieldList, Map<String, Object> mustTermFilter); Map<String, Long> getAssetsAffectedCount(String assetGroup, Map<String, String> filter, String parentType); List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application,
			String parentType, String severity); List<Map<String, Object>> getVulnerabilityTrend(String assetGroup, Map<String, String> filter, Date from,
			Date to); List<Map<String, Object>> getVulnerabilitiesDistribution(String assetGroup, String parentType); Map<String, Object> getVulnerabilitysummaryByResourceId(String resourceId); List<Map<String, Object>> getVulnerabilityDetailsByResourceId(String resourceId); @SuppressWarnings("deprecation") List<Map<String, Object>> fetchExecDirectorApps(); Map<String, Object> getUniqueHost(String assetGroup, String severity); Map<String, Object> getVulnInfo(String assetGroup, String severity); Map<String, Object> getUniqueApp(String assetGroup); List<Map<String, Object>> getAgingSummary(String assetGroup); long getTotalQualysHostCount(String index, String vulnType); Map<String, Object> getVulnerabilityByQid(String qid); Map<String, Object> getDistributionSummaryByInfraType(String assetGroup, String severitylevel,
			String parentType); Map<String, Long> getProdInfoByEnv(String assetGroup, String severitylevel); Map<String, Long> getNonProdInfoByEnv(String assetGroup, String severitylevel); List<Map<String, Object>> getDistributionSummaryByVulnType(String assetGroup, String severity); Map<String, Object> getAllQidByAG(String assetGroup, String severity); Map<String, Long> getAppsBySeverity(String assetGroup, String parentType, String severity); boolean createTrendAnnotation(TrendNote request); void createIndex(String indexName); List<Map<String, Object>> getTrendAnnotations(String ag, Date from); boolean deleteTrendAnnotation(String noteId); List<Map<String, Object>> getDataFromPacmanRDS(String query); long getRunningInstancesCount(String index, String vulnType); long getExemptedByRuleCount(String index, String vulnType); Map<String, Object> getUniqueHostBySeverity(String index, String severity); Map<String, Object> getCompliantHostsBySeverity(String assetGroup); List<String> getNonCompliantResourceIds(String index); @SuppressWarnings("deprecation") List<Map<String, Object>> fetchOrgInfoForApps(); List<Map<String, Object>> getTrendProgress(String assetGroup, String ruleId, LocalDate startDate,
			LocalDate endDate, String trendCategory); int vulnerabilityAssetsCount(String assetGroup, String targetType, Map<String, Object> mustFilter, int from,
			int size, Map<String, Object> mustTermsFilter); }
VulnerabilityRepository implements Constants { public List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application, String parentType, String severity) throws Exception { List<Map<String, Object>> vulnApplications = new ArrayList<>(); StringBuilder urlToQuery = new StringBuilder(esUrl).append("/").append(assetGroup); urlToQuery.append("/").append(parentType); urlToQuery.append("/").append(SEARCH); StringBuilder requestBody = new StringBuilder( "{\"size\":0,\"query\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}}"); if (StringUtils.isNotEmpty(application)) { requestBody.append(",{\"match\":{\"tags.Application.keyword\":\""); requestBody.append(application); requestBody.append("\"}}"); } requestBody.append("]}},\"aggs\":{\"apps\":{\"terms\":{\"field\":\""); requestBody.append(filter); requestBody.append( "\",\"size\":10000},\"aggs\":{\"vulns\":{\"children\":{\"type\":\"vulninfo\"},\"aggs\":{\"NAME\":{\"filters\":{\"filters\":{\""); if (StringUtils.isNotEmpty(severity)) { requestBody.append("S").append(severity); requestBody.append("\":{\"bool\":{\"must\":[{\"match\":{\"latest\":true}},{\"term\":{\"severitylevel.keyword\":") .append(severity).append("}}]}}"); } else { requestBody.append( "S3\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":3}},{\"match\":{\"latest\":true}}]}},\"S4\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":4}},{\"match\":{\"latest\":true}}]}},\"S5\":{\"bool\":{\"must\":[{\"term\":{\"severitylevel.keyword\":5}},{\"match\":{\"latest\":true}}]}}"); } requestBody.append("}}}}}}}}}"); String responseJson = ""; try { responseJson = PacHttpUtils.doHttpPost(urlToQuery.toString(), requestBody.toString()); } catch (Exception e) { LOGGER.error("Error in getVulnerabilyAcrossAppAndEnv from ES", e); throw e; } JsonParser jsonParser = new JsonParser(); JsonObject resultJson = (JsonObject) jsonParser.parse(responseJson); JsonObject aggsJson = (JsonObject) jsonParser.parse(resultJson.get(AGGREGATIONS).toString()); JsonArray outerBuckets = aggsJson.getAsJsonObject("apps").getAsJsonArray(BUCKETS); if (outerBuckets.size() > 0) { for (int i = 0; i < outerBuckets.size(); i++) { String appName = outerBuckets.get(i).getAsJsonObject().get("key").getAsString(); List<Map<String, Object>> severityInfo = getSeverityInfo(outerBuckets.get(i).getAsJsonObject() .getAsJsonObject(VULN).getAsJsonObject("NAME").getAsJsonObject(BUCKETS), severity); Map<String, Object> applicationInfo = new HashMap<>(); if (filter.equals(TAGS_APPS)) { applicationInfo.put(APPS, appName); } else { applicationInfo.put("environment", appName); } applicationInfo.put("severityinfo", severityInfo); if (StringUtils.isEmpty(severity)) { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(1).get(COUNT).toString()) + Integer.valueOf(severityInfo.get(2).get(COUNT).toString())); } else { applicationInfo.put(VULNEREBILITIES, Integer.valueOf(severityInfo.get(0).get(COUNT).toString())); } vulnApplications.add(applicationInfo); } } return vulnApplications; }  List<Map<String, Object>> getAllVulnerabilities(List<String> vulnAssetsAffectedQids); List<Map<String, Object>> getAllVulnerabilitiesByAssetGroup(String assetGroup, String targetType,
			Map<String, Object> mustFilter, List<String> occurrenceFieldList, int from, int size,
			Map<String, Object> mustTermsFilter); List<Map<String, Object>> getDetailsByResourceId(String assetGroup, Map<String, Object> mustFilter,
			List<String> resourceFieldList, Map<String, Object> mustTermFilter); Map<String, Long> getAssetsAffectedCount(String assetGroup, Map<String, String> filter, String parentType); List<Map<String, Object>> getVulnerabilyAcrossAppAndEnv(String assetGroup, String filter, String application,
			String parentType, String severity); List<Map<String, Object>> getVulnerabilityTrend(String assetGroup, Map<String, String> filter, Date from,
			Date to); List<Map<String, Object>> getVulnerabilitiesDistribution(String assetGroup, String parentType); Map<String, Object> getVulnerabilitysummaryByResourceId(String resourceId); List<Map<String, Object>> getVulnerabilityDetailsByResourceId(String resourceId); @SuppressWarnings("deprecation") List<Map<String, Object>> fetchExecDirectorApps(); Map<String, Object> getUniqueHost(String assetGroup, String severity); Map<String, Object> getVulnInfo(String assetGroup, String severity); Map<String, Object> getUniqueApp(String assetGroup); List<Map<String, Object>> getAgingSummary(String assetGroup); long getTotalQualysHostCount(String index, String vulnType); Map<String, Object> getVulnerabilityByQid(String qid); Map<String, Object> getDistributionSummaryByInfraType(String assetGroup, String severitylevel,
			String parentType); Map<String, Long> getProdInfoByEnv(String assetGroup, String severitylevel); Map<String, Long> getNonProdInfoByEnv(String assetGroup, String severitylevel); List<Map<String, Object>> getDistributionSummaryByVulnType(String assetGroup, String severity); Map<String, Object> getAllQidByAG(String assetGroup, String severity); Map<String, Long> getAppsBySeverity(String assetGroup, String parentType, String severity); boolean createTrendAnnotation(TrendNote request); void createIndex(String indexName); List<Map<String, Object>> getTrendAnnotations(String ag, Date from); boolean deleteTrendAnnotation(String noteId); List<Map<String, Object>> getDataFromPacmanRDS(String query); long getRunningInstancesCount(String index, String vulnType); long getExemptedByRuleCount(String index, String vulnType); Map<String, Object> getUniqueHostBySeverity(String index, String severity); Map<String, Object> getCompliantHostsBySeverity(String assetGroup); List<String> getNonCompliantResourceIds(String index); @SuppressWarnings("deprecation") List<Map<String, Object>> fetchOrgInfoForApps(); List<Map<String, Object>> getTrendProgress(String assetGroup, String ruleId, LocalDate startDate,
			LocalDate endDate, String trendCategory); int vulnerabilityAssetsCount(String assetGroup, String targetType, Map<String, Object> mustFilter, int from,
			int size, Map<String, Object> mustTermsFilter);  }