code: private Set<String> parseInstanceStates(final Map<String, String[]> queryParams) {
          Set<String> instanceStates = new TreeSet<String>();
  
          for (String queryKey : queryParams.keySet()) {
              // e.g. Filter.1.Value.1: running, Filter.1.Value.2: pending
              if (queryKey.startsWith("Filter.1.Value")) {
                  for (String state : queryParams.get(queryKey)) {
                      instanceStates.add(state);
                  }
              }
          }
          return instanceStates;
      }
docs: Parse instance states from query parameters.
  
  @param queryParams
  map of query parameters in http request
  @return a set of instance states in the parameter map