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

    ActionsFilter actionsFilter = createMocks(true);
    HttpRequest httpRequest = mock(HttpRequest.class);
    when(httpRequest.getUri()).thenReturn(EXPECTED_URL);
    RequestToPageLoadingEventConverter requestToPageLoadingEventConverter =
            new RequestToPageLoadingEventConverter(BASE_URL, actionsFilter);
    Optional<Map<String, String>> expected = Optional.of(ImmutableMap.of(
            EVENT, EXAMPLE_EVENT_NAME,
            ALIAS_PARAMETER, EXAMPLE_CONTINUATION
    ));
    Optional<Map<String, String>> actual = requestToPageLoadingEventConverter.convert(httpRequest);
    assertEquals(expected, actual);
}