/*
 * Copyright 2015 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

package com.hp.autonomy.iod.client.api.textindexing;

import com.hp.autonomy.iod.client.util.MultiMap;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Collections;
import java.util.Map;
import java.util.Set;

@Setter
@Accessors(chain = true)
public class ListIndexesRequestBuilder {
    /**
     * @param indexTypes The value of the type parameter
     */
    private final Set<IndexType> indexTypes = Collections.emptySet();

    /**
     * @param indexFlavors The value of the flavor parameter
     */
    private final Set<IndexFlavor> indexFlavors = Collections.emptySet();

    /**
     * @return A map of parameters suitable for use with {@link ListIndexesService}.
     */
    public Map<String, Object> build() {
        final Map<String, Object> map = new MultiMap<>();

        for(final IndexType indexType : indexTypes) {
            map.put("type", indexType);
        }

        for (final IndexFlavor indexFlavor : indexFlavors) {
            map.put("flavor", indexFlavor);
        }

        return map;
    }
}

@@ -371,16 +371,42 @@
 ctions;%0A
+import java.util.HashSet;%0A
 import j
@@ -415,24 +415,24 @@
 a.util.Map;%0A
-
 import java.
@@ -593,38 +593,32 @@
  */%0A    private 
-final 
 Set%3CIndexType%3E i
@@ -629,36 +629,29 @@
 Types = 
-Collections.empty
+new Hash
 Set
+%3C%3E
 ();%0A%0A   
@@ -736,22 +736,16 @@
 private 
-final 
 Set%3CInde
@@ -772,28 +772,21 @@
 s = 
-Collections.empty
+new Hash
 Set
+%3C%3E
 ();%0A

Fix a compilation error in the tests.