Add fix for SQL injection.
[policy/engine.git] / POLICY-SDK-APP / src / test / java / org / onap / policy / controller / PolicyControllerTest.java
index 817a624..382637c 100644 (file)
@@ -25,6 +25,8 @@ import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.script.SimpleBindings;
+
 import org.apache.commons.io.IOUtils;
 import org.junit.Before;
 import org.junit.Test;
@@ -56,7 +58,7 @@ public class PolicyControllerTest {
         entity.setScope("com");
         data.add(entity);
         
-        when(commonClassDao.getDataByQuery("FROM PolicyEntity where policyName = 'Config_SampleTest1206.1.xml' and scope ='com'")).thenReturn(data);
+        when(commonClassDao.getDataByQuery("FROM PolicyEntity where policyName = 'Config_SampleTest1206.1.xml' and scope ='com'", new SimpleBindings())).thenReturn(data);
        }
        
        @Test