ScrollModifier implements CollectorJob { @Override public CollectorStepResult collect() throws ProcessingException { String jsSnippet = parametersParser.getJavaScriptSnippet(); LOG.debug("Executing Scroll Modifier"); jsExecutor.execute(jsSnippet); return CollectorStepResult.newModifierResult(); } ScrollModifier(JavaScriptJobExecutor jsExecutor); @Override void setParameters(Map<String, String> params); @Override CollectorStepResult collect();  }
@Test(expected = ParametersException.class) public void testInvalidScrollPosition() throws ParametersException, ProcessingException { parameters.put("position", "middle"); collect(); }
@Test(expected = ParametersException.class) public void testToManyParameters() throws ParametersException, ProcessingException { parameters.put("position", "top"); parameters.put("css", "#id"); collect(); }