improve NeutronSecurityRuleTests to cover 404 on modify of non-existant
[neutron.git] / integration / test-standalone / src / main / java / org / opendaylight / neutron / e2etest / HttpUtils.java
index 5ce5b635817235e5dd5be68106e7a926bbefe667..bee5779e1635820a196e89c87ea9d71d4c3ea461 100644 (file)
@@ -84,10 +84,14 @@ public final class HttpUtils {
     }
 
     static void test_modify(String urlStr, String content, String context) {
+        test_modify(urlStr, 200, content, context);
+    }
+
+    static void test_modify(String urlStr, int responseCode, String content, String context) {
         try {
             URL url = new URL(urlStr);
             HttpURLConnection httpConn = httpURLConnectionFactoryPut(url, content);
-            Assert.assertEquals(context, 200, httpConn.getResponseCode());
+            Assert.assertEquals(context, responseCode, httpConn.getResponseCode());
         } catch (IOException e) {
             throw new UncheckedIOException(e);
         }