/*
 * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 * WSO2 Inc. licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.wso2.is.portal.user.client.api.unit.test;

import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerSuite;
import org.ops4j.pax.exam.testng.listener.PaxExam;
import org.osgi.framework.BundleContext;
import org.testng.Assert;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import org.wso2.carbon.identity.recovery.model.ChallengeQuestion;
import org.wso2.carbon.kernel.utils.CarbonServerInfo;
import org.wso2.is.portal.user.client.api.ChallengeQuestionManagerClientService;
import org.wso2.is.portal.user.client.api.exception.UserPortalUIException;
import org.wso2.is.portal.user.client.api.unit.test.util.UserPortalOSGiTestUtils;

import javax.inject.Inject;
import java.nio.file.Paths;
import java.util.List;

import static org.ops4j.pax.exam.CoreOptions.systemProperty;

@Listeners(PaxExam.class)
@ExamReactorStrategy(PerSuite.class)
public class ChallengeQuestionManagerClientServiceTest {

    @Inject
    private BundleContext bundleContext;

    @Inject
    private CarbonServerInfo carbonServerInfo;

/*    @Inject
    private ChallengeQuestionManagerClientService challengeQuestionManagerService;*/


    @Configuration
    public Option[] createConfiguration() {

        List<Option> optionList = UserPortalOSGiTestUtils.getDefaultSecurityPAXOptions();

        optionList.add(systemProperty("java.security.auth.login.config")
                .value(Paths.get(UserPortalOSGiTestUtils.getCarbonHome(), "conf", "security", "carbon-jaas.config")
                        .toString()));

        return optionList.toArray(new Option[optionList.size()]);
    }

    @Test(groups = "getChallengeQuestion")
    public void testGetChallengeQuestionList() throws UserPortalUIException {
        /*ChallengeQuestionManagerClientService challengeQuestionManagerService =
                bundleContext.getService(bundleContext.getServiceReference(ChallengeQuestionManagerClientService.class));
        Assert.assertNotNull(challengeQuestionManagerService, "Failed to get ChallengeQuestionManagerClientService instance");*/

        /*List<ChallengeQuestion> challengeQuestions = challengeQuestionManagerService.getChallengeQuestionList();
        Assert.assertNotNull(challengeQuestions, "Failed to retrieve the challenge question list.");*/
    }
}
@@ -999,34 +999,8 @@
 xt;%0A
-import org.testng.Assert;%0A
 impo
@@ -1099,184 +1099,37 @@
 bon.
-identity.recovery.model.ChallengeQuestion;%0Aimport org.wso2.carbon.kernel.utils.CarbonServerInfo;%0Aimport org.wso2.is.portal.user.client.api.ChallengeQuestionManagerClientService
+kernel.utils.CarbonServerInfo
 ;%0Aim

Remove unnecessary imports