Source:
public void testAddDraggableGroupsWithExperimental() { disabledExperimentalFeatures.add(Group1LayoutDragComponent1.class.getName()); disabledExperimentalFeatures.add(Group1LayoutDragComponent3.class.getName()); disabledExperimentalFeatures.add(Group2LayoutComponentPaletteGroupProvider.class.getName()); disabledExperimentalFeatures.add(Group3LayoutDragComponent1.class.getName()); presenter.addDraggableGroups(Arrays.asList(new Group1LayoutComponentPaletteGroupProvider(true), new Group2LayoutComponentPaletteGroupProvider(), new Group3LayoutComponentPaletteGroupProvider())); verify(dragComponentGroupPresenter, times(2)).init(any()); verify(dragComponentGroupPresenter, times(2)).getView(); verify(dragComponentGroupView, times(1)).setExpanded(true); verify(dragComponentGroupView, times(1)).setExpanded(false); verify(view, times(2)).addDraggableComponentGroup(any()); assertEquals(2, presenter.getLayoutDragComponentGroups().size()); assertNotNull(presenter.getLayoutDragComponentGroups().get(Group1LayoutComponentPaletteGroupProvider.ID)); assertFalse(presenter.hasDraggableComponent(Group1LayoutComponentPaletteGroupProvider.ID, Group1LayoutDragComponent1.ID)); assertTrue(presenter.hasDraggableComponent(Group1LayoutComponentPaletteGroupProvider.ID, Group1LayoutDragComponent2.ID)); assertFalse(presenter.hasDraggableComponent(Group1LayoutComponentPaletteGroupProvider.ID, Group1LayoutDragComponent3.ID)); assertNull(presenter.getLayoutDragComponentGroups().get(Group2LayoutComponentPaletteGroupProvider.ID)); assertFalse(presenter.hasDraggableComponent(Group2LayoutComponentPaletteGroupProvider.ID, Group2LayoutDragComponent1.ID)); assertFalse(presenter.hasDraggableComponent(Group2LayoutComponentPaletteGroupProvider.ID, Group2LayoutDragComponent2.ID)); assertNotNull(presenter.getLayoutDragComponentGroups().get(Group3LayoutComponentPaletteGroupProvider.ID)); assertFalse(presenter.hasDraggableComponent(Group3LayoutComponentPaletteGroupProvider.ID, Group3LayoutDragComponent1.ID)); }

Target:
public void testAddDraggableGroupsWithExperimental() { disabledExperimentalFeatures.add(Group1LayoutDragComponent1.class.getName()); disabledExperimentalFeatures.add(Group1LayoutDragComponent3.class.getName()); disabledExperimentalFeatures.add(Group2LayoutComponentPaletteGroupProvider.class.getName()); disabledExperimentalFeatures.add(Group3LayoutDragComponent1.class.getName()); presenter.addDraggableGroups(Arrays.asList(new Group1LayoutComponentPaletteGroupProvider(true), new Group2LayoutComponentPaletteGroupProvider(), new Group3LayoutComponentPaletteGroupProvider())); verify(dragComponentGroupPresenter, times(2)).init(any()); verify(dragComponentGroupPresenter, times(2)).getView(); verify(dragComponentGroupView).setExpanded(true); verify(dragComponentGroupView).setExpanded(false); verify(view, times(2)).addDraggableComponentGroup(any()); assertEquals(2, presenter.getLayoutDragComponentGroups().size()); assertNotNull(presenter.getLayoutDragComponentGroups().get(Group1LayoutComponentPaletteGroupProvider.ID)); assertFalse(presenter.hasDraggableComponent(Group1LayoutComponentPaletteGroupProvider.ID, Group1LayoutDragComponent1.ID)); assertTrue(presenter.hasDraggableComponent(Group1LayoutComponentPaletteGroupProvider.ID, Group1LayoutDragComponent2.ID)); assertFalse(presenter.hasDraggableComponent(Group1LayoutComponentPaletteGroupProvider.ID, Group1LayoutDragComponent3.ID)); assertNull(presenter.getLayoutDragComponentGroups().get(Group2LayoutComponentPaletteGroupProvider.ID)); assertFalse(presenter.hasDraggableComponent(Group2LayoutComponentPaletteGroupProvider.ID, Group2LayoutDragComponent1.ID)); assertFalse(presenter.hasDraggableComponent(Group2LayoutComponentPaletteGroupProvider.ID, Group2LayoutDragComponent2.ID)); assertNotNull(presenter.getLayoutDragComponentGroups().get(Group3LayoutComponentPaletteGroupProvider.ID)); assertFalse(presenter.hasDraggableComponent(Group3LayoutComponentPaletteGroupProvider.ID, Group3LayoutDragComponent1.ID)); }