HttpRequestFactory { public static BaseRequest getHttpRequest(String format, TankHttpClient httpclient) throws IllegalArgumentException { if (format.equalsIgnoreCase(ScriptConstants.XML_TYPE)) { return new XMLRequest(httpclient, new TankLogUtil()); } else if (format.equalsIgnoreCase(ScriptConstants.NVP_TYPE)) { return new KeyValueRequest(httpclient, new TankLogUtil()); } else if (format.equalsIgnoreCase(ScriptConstants.MULTI_PART_TYPE)) { return new MultiPartRequest(httpclient, new TankLogUtil()); } else if (format.equalsIgnoreCase(ScriptConstants.JSON_TYPE)) { return new JsonRequest(httpclient, new TankLogUtil()); } else if (format.equalsIgnoreCase(ScriptConstants.PLAIN_TEXT_TYPE)) { return new PlainTextRequest(httpclient, new TankLogUtil()); } else { throw new IllegalArgumentException("unknown request format - " + format); } }  static BaseRequest getHttpRequest(String format, TankHttpClient httpclient);  }
@Test public void testGetHttpRequest_1() throws Exception { String format = ScriptConstants.XML_TYPE; BaseRequest result = HttpRequestFactory.getHttpRequest(format, null); assertNotNull(result); }
@Test public void testGetHttpRequest_2() throws Exception { String format = ScriptConstants.JSON_TYPE; BaseRequest result = HttpRequestFactory.getHttpRequest(format, null); assertNotNull(result); }
@Test public void testGetHttpRequest_3() throws Exception { String format = ScriptConstants.PLAIN_TEXT_TYPE; BaseRequest result = HttpRequestFactory.getHttpRequest(format, null); assertNotNull(result); }
@Test public void testGetHttpRequest_4() throws Exception { String format = ScriptConstants.MULTI_PART_TYPE; BaseRequest result = HttpRequestFactory.getHttpRequest(format, null); assertNotNull(result); }
@Test public void testGetHttpRequest_5() throws Exception { String format = ScriptConstants.NVP_TYPE; BaseRequest result = HttpRequestFactory.getHttpRequest(format, null); assertNotNull(result); }