/**
 * Copyright 2005-2014 The Kuali Foundation
 *
 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
 *
 * 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.kuali.kra.questionnaire;

import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.kuali.coeus.common.questionnaire.impl.QuestionnaireDao;
import org.kuali.coeus.common.questionnaire.impl.QuestionnaireDaoOjb;
import org.kuali.coeus.sys.framework.service.KcServiceLocator;
import org.kuali.kra.irb.Protocol;
import org.kuali.kra.irb.ProtocolDocument;
import org.kuali.kra.irb.ProtocolFinderDao;
import org.kuali.kra.irb.test.ProtocolFactory;
import org.kuali.kra.test.infrastructure.KcIntegrationTestBase;
import org.kuali.rice.kew.api.exception.WorkflowException;
import org.kuali.rice.krad.UserSession;
import org.kuali.rice.krad.util.GlobalVariables;

import static org.junit.Assert.assertEquals;

/**
 * @author Kuali Rice Team (rice.collab@kuali.org)
 */
public class QuestionnaireDaoOjbTest {
    private QuestionnaireDao questionnaireDao = new QuestionnaireDaoOjb();

    private static final String QUESTIONNAIRE_SEQUENCE_ID = "1000";
    private static final Integer CURRENT_QUESTIONNAIRE_SEQUENCE_NUMBER = 1;

  @Test
    public void testFindProtocol() throws WorkflowException {
      assertEquals(CURRENT_QUESTIONNAIRE_SEQUENCE_NUMBER, questionnaireDao.getCurrentQuestionnaireSequenceNumber(QUESTIONNAIRE_SEQUENCE_ID));

    }
}
@@ -657,55 +657,8 @@
 e;%0A%0A
-import java.util.List;%0Aimport org.junit.After;%0A
 impo
@@ -795,285 +795,46 @@
 eus.
-common.questionnaire.impl.QuestionnaireDaoOjb;%0Aimport org.kuali.coeus.sys.framework.service.KcServiceLocator;%0Aimport org.kuali.kra.irb.Protocol;%0Aimport org.kuali.kra.irb.ProtocolDocument;%0Aimport org.kuali.kra.irb.ProtocolFinderDao;%0Aimport org.kuali.kra.irb.test.ProtocolFactory
+sys.framework.service.KcServiceLocator
 ;%0Aim
@@ -957,97 +957,8 @@
 ion;
-%0Aimport org.kuali.rice.krad.UserSession;%0Aimport org.kuali.rice.krad.util.GlobalVariables;
 %0A%0Aim
@@ -1097,16 +1097,46 @@
 OjbTest 
+extends KcIntegrationTestBase 
 %7B%0A    pr
@@ -1178,36 +1178,8 @@
 eDao
- = new QuestionnaireDaoOjb()
 ;%0A%0A 
@@ -1322,12 +1322,153 @@
 R = 
-1;%0A%0A
+2;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        questionnaireDao = KcServiceLocator.getService(%22questionnaireDao%22);%0A    %7D%0A%0A%0A  
   @T

fix test