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

    ActionsFilter actionsFilter = createMocks(false);
    when(actionsFilter.filter(PAGE_LOADING)).thenReturn(new ArrayList<>());
    HttpRequest httpRequest = mock(HttpRequest.class);
    when(httpRequest.getUri()).thenReturn(EXPECTED_URL);
    
    RequestToPageLoadingEventConverter requestToPageLoadingEventConverter =
            new RequestToPageLoadingEventConverter(BASE_URL, actionsFilter);
    Optional<Map<String, String>> expected = Optional.empty();
    Optional<Map<String, String>> actual = requestToPageLoadingEventConverter.convert(httpRequest);
    assertEquals(expected, actual);
}