fail("should've thrown an exception!");
}
@Test(expected = Exception.class)
public void createWidgetFromInvalidServiceUrlPort() throws Exception {
MockHttpServletRequest request;
request = new MockHttpServletRequest();
request.setScheme("HTTP");
request.setServerName("localhost");
request.setServerPort(8888);
request.setParameter("url", TEST_GADGET_URL_VALID);
@SuppressWarnings("unused")
W3CWidget widget = GadgetUtils.createWidget(request);
// Uh-oh! No exception was thrown so we
// better make this test fail!
fail("should've thrown an exception!");