@Test
public void testOnDataSetDefRemovedEvent() {

    final DataSetDef removedDataSetDef = mock(DataSetDef.class);
    when(removedDataSetDef.getUUID()).thenReturn("removed");
    when(removedDataSetDef.getName()).thenReturn("removedDef");
    when(removedDataSetDef.isPublic()).thenReturn(true);
    when(removedDataSetDef.getProvider()).thenReturn(DataSetProviderType.SQL);
    final DataSetDefRemovedEvent event = mock(DataSetDefRemovedEvent.class);
    when(event.getDataSetDef()).thenReturn(removedDataSetDef);
    presenter.onDataSetDefRemovedEvent(event);
    assertEquals(1, presenter.panels.size());
    assertEquals(dataSetPanel, presenter.panels.get(0));
    verify(view, times(1)).clear();
    verify(view, times(1)).addPanel(any(DataSetPanel.View.class));
    verify(dataSetPanel, times(1)).show(dataSetDef, "dataSetsExplorerPanelGroup");
}