@Test
public void testOnFilterChangedEvent() throws Exception {

    DataSetFilter oldFilter = mock(DataSetFilter.class);
    List<ColumnFilter> oldCreateColumnFilters = createColumnFilters("col1", "col2", "col3");
    when(oldFilter.getColumnFilterList()).thenReturn(oldCreateColumnFilters);
    DataSetFilter newFilter = mock(DataSetFilter.class);
    List<ColumnFilter> createColumnFilters = createColumnFilters("col2");
    when(newFilter.getColumnFilterList()).thenReturn(createColumnFilters);
    when(dataSetDef.getDataSetFilter()).thenReturn(newFilter);
    FilterChangedEvent filterChangedEvent = mock(FilterChangedEvent.class);
    when(filterChangedEvent.getContext()).thenReturn(dataSetFilterEditor);
    when(filterChangedEvent.getOldFilter()).thenReturn(oldFilter);
    when(filterChangedEvent.getFilter()).thenReturn(newFilter);
    tested.onFilterChangedEvent(filterChangedEvent);
    verify(columnsEditor, times(1)).onValueRestricted("col2");
    verify(columnsEditor, times(1)).onValueUnRestricted("col1");
    verify(columnsEditor, times(1)).onValueUnRestricted("col3");
    verify(columnsEditor, times(0)).setAcceptableValues(any(List.class));
    verify(view, times(0)).init(tested);
    verify(view, times(0)).initWidgets(any(IsWidget.class), any(DataSetDefFilterEditor.View.class));
    verify(view, times(0)).setMaxHeight(anyString());
}