@Test public void linkHandlerTest() throws IOException { Runner runner = new Runner(); runner.setDriver(driver); CommandFactory cf = runner.getCommandFactory(); TestCase testCase = Binder.newTestCase("dummy", "dummy", wsr.getBaseURL()); testCase.addCommand(cf, "open", "/link_handler.html"); testCase.addCommand(cf, commandName, "link=" + argument); Result result = runner.execute(testCase); assertThat(result, is(instanceOf(resultClass))); }