class CommonUtils {

    private static List<Map<String, Object>> getFilter(final HashMultimap<String, Object> filter) {
        List<Map<String, Object>> finalFilter = Lists.newArrayList();
        for (Map.Entry<String, Object> entry : filter.entries()) {
            Map<String, Object> term = Maps.newHashMap();
            Map<String, Object> termDetails = Maps.newHashMap();
            termDetails.put(entry.getKey(), entry.getValue());
            term.put("term", termDetails);
            finalFilter.add(term);
        }
        return finalFilter;
    }

}