### Question:
ActionsFilter { public List<ApplicationActionConfiguration> filter(String webDriverActionType) { return applicationActionConfigurations.stream() .filter(configuration -> actionIsFromType(configuration, webDriverActionType)) .collect(Collectors.toList()); } ActionsFilter(List<ApplicationActionConfiguration> applicationActionConfigurations); List<ApplicationActionConfiguration> filter(String webDriverActionType); boolean actionIsFromType(ApplicationActionConfiguration applicationActionConfiguration,
                                    String webDriverActionType);  }### Answer:
@Test public void includesTheCorrectItems() { ApplicationActionConfiguration configThatShouldBeIncluded = mock(ApplicationActionConfiguration.class, RETURNS_DEEP_STUBS); when(configThatShouldBeIncluded.getWebDriverAction().getWebDriverActionType()).thenReturn(PAGE_LOADING); ApplicationActionConfiguration configThatShouldNotBeIncluded = mock(ApplicationActionConfiguration.class, RETURNS_DEEP_STUBS); when(configThatShouldNotBeIncluded.getWebDriverAction().getWebDriverActionType()).thenReturn(CLICK_CSS_SELECTOR); List<ApplicationActionConfiguration> configurationList = Arrays.asList(configThatShouldBeIncluded, configThatShouldBeIncluded); ActionsFilter actionsFilter = new ActionsFilter(configurationList); List<ApplicationActionConfiguration> filteredActions = actionsFilter.filter(PAGE_LOADING); assertTrue(filteredActions.contains(configThatShouldBeIncluded)); assertFalse(filteredActions.contains(configThatShouldNotBeIncluded)); }