summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'POLICY-SDK-APP/src/test/java')
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java
index af573c616..35395a859 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java
@@ -386,8 +386,10 @@ public class CreateOptimizationControllerTest {
public void testSetModelData() {
logger.debug("testSetModelData: enter");
-
+
+ CreateOptimizationController controller = new CreateOptimizationController();
HttpServletRequest request = createMock(HttpServletRequest.class);
+ MockHttpServletResponse response = new MockHttpServletResponse();
expect(request.getContentType()).andReturn("multipart/form-data; boundary=----WebKitFormBoundaryWcRUaIbC8kXgjr3p");
expect(request.getMethod()).andReturn("post");
expect(request.getHeader("Content-length")).andReturn("7809");
@@ -407,12 +409,14 @@ public class CreateOptimizationControllerTest {
expect(request.getCharacterEncoding()).andReturn("UTF-8");
expect(request.getContentLength()).andReturn(1024);
replay(request);
-
+ controller.setModelData(request, response);
+
} catch (Exception e) {
logger.error("testSetModelData" + e);
e.printStackTrace();
}
+
logger.debug("testSetModelData: exit");
}