// Path: indexer/ai/src/main/java/com/google/cloudsearch/exceptions/InvalidConfigException.java
// public class InvalidConfigException extends Exception {
//         public InvalidConfigException(String e){
//             super(e);
//         }
// }


import com.google.cloudsearch.exceptions.InvalidConfigException;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.io.FileReader;
import java.io.IOException;
package com.google.cloudsearch.ai;


/**
 * Test Class StandardSkillCategoryExtraction
 */
public class TestCategoryExtractionSkill {

    @Rule
    public final ExpectedException exception = ExpectedException.none();

    /**
     * Returns the Sample Schema JSON file used for testing.
     * @return
     */
    private JSONObject getTestSchema() {
        JSONParser parser = new JSONParser();
        JSONObject schema = null;
        try {
            schema = (JSONObject) parser.parse(new FileReader("./src/test/java/com/google/cloudsearch/ai/testFiles/CategoryExtraction/sampleSchema.json"));
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return schema;
    }

    /**
     * Returns the skill configuration file based on input configName.
     * @param configName
     * @return
     */
    private JSONObject getTestConfig(String configName) {
        JSONParser parser = new JSONParser();
        JSONObject config = null;
        try {
            config = (JSONObject) parser.parse(new FileReader("./src/test/java/com/google/cloudsearch/ai/testFiles/CategoryExtraction/"+configName+".json"));
            for(Object obj : (JSONArray)config.get("aiSkillSet")) {
                return (JSONObject) obj;
            }
// Path: indexer/ai/src/main/java/com/google/cloudsearch/exceptions/InvalidConfigException.java
// public class InvalidConfigException extends Exception {
//         public InvalidConfigException(String e){
//             super(e);
//         }
// }


// Path: indexer/ai/src/test/java/com/google/cloudsearch/ai/TestCategoryExtractionSkill.java
import com.google.cloudsearch.exceptions.InvalidConfigException;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.io.FileReader;
import java.io.IOException;

package com.google.cloudsearch.ai;


/**
 * Test Class StandardSkillCategoryExtraction
 */
public class TestCategoryExtractionSkill {

    @Rule
    public final ExpectedException exception = ExpectedException.none();

    /**
     * Returns the Sample Schema JSON file used for testing.
     * @return
     */
    private JSONObject getTestSchema() {
        JSONParser parser = new JSONParser();
        JSONObject schema = null;
        try {
            schema = (JSONObject) parser.parse(new FileReader("./src/test/java/com/google/cloudsearch/ai/testFiles/CategoryExtraction/sampleSchema.json"));
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return schema;
    }

    /**
     * Returns the skill configuration file based on input configName.
     * @param configName
     * @return
     */
    private JSONObject getTestConfig(String configName) {
        JSONParser parser = new JSONParser();
        JSONObject config = null;
        try {
            config = (JSONObject) parser.parse(new FileReader("./src/test/java/com/google/cloudsearch/ai/testFiles/CategoryExtraction/"+configName+".json"));
            for(Object obj : (JSONArray)config.get("aiSkillSet")) {
                return (JSONObject) obj;
            }
        } catch (IOException e) {