@Before
public void setup() throws MalformedURLException {
CandidateElementExtractorFactory elementExtractor =
mock(CandidateElementExtractorFactory.class);
when(elementExtractor.newExtractor(browser)).thenReturn(extractor);
FormHandlerFactory formHandlerFactory = mock(FormHandlerFactory.class);
when(formHandlerFactory.newFormHandler(browser)).thenReturn(formHandler);
url = new URL("http://example.com");
when(browser.getCurrentUrl()).thenReturn(url.toExternalForm());
when(sessionProvider.get()).thenReturn(session);
CrawljaxConfiguration config = Mockito.spy(CrawljaxConfiguration.builderFor(url).build());