reduce copy/paste between HttpUtils's test_create() methods
[neutron.git] / integration / test-standalone / src / main / java / org / opendaylight / neutron / e2etest / HttpUtils.java
index 0472334d0eb192adc8a2098b8b42fdaeb2a0f7eb..c3b5b6334d9dbce8cdac5edb252e28c91971d352 100644 (file)
@@ -67,13 +67,7 @@ public final class HttpUtils {
     }
 
     static void test_create(String urlStr, String content, String context) {
-        try {
-            URL url = new URL(urlStr);
-            HttpURLConnection httpConn = httpURLConnectionFactoryPost(url, content);
-            Assert.assertEquals(context, 201, httpConn.getResponseCode());
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
+        test_create(urlStr, 201, content, context);
     }
 
     static void test_create(String urlStr, int responseCode, String content, String context) {