@Test
public void exceptionIsThrownIfBaseUrlDoesNotMatch() throws MalformedURLException, UnsupportedEncodingException {

    ActionsFilter actionsFilter = createMocks(false);
    HttpRequest httpRequest = mock(HttpRequest.class);
    when(httpRequest.getUri()).thenReturn(WRONG_URL);
    RequestToPageLoadingEventConverter requestToPageLoadingEventConverter =
            new RequestToPageLoadingEventConverter(BASE_URL, actionsFilter);
    expectedException.expect(IllegalArgumentException.class);
    requestToPageLoadingEventConverter.convert(httpRequest);
}