ColumnWithComponents implements Column { public void onDrop(ColumnDrop.Orientation orientation, String dndData) { if (dndManager.isOnComponentMove()) { dropCommand.execute(new ColumnDrop(dndManager.getLayoutComponentMove(), id, orientation) .fromMove(dndManager.getDraggedColumn())); } else { dropCommand.execute( new ColumnDrop(layoutDragComponentHelper.getLayoutComponentFromDrop(dndData), id, orientation)); } lockRequiredEvent.fire(new LockRequiredEvent()); } @Inject  ColumnWithComponents(final View view,
                                Instance<Row> rowInstance,
                                DnDManager dndManager,
                                LayoutDragComponentHelper layoutDragComponentHelper,
                                Event<ColumnResizeEvent> columnResizeEvent,
                                Event<LockRequiredEvent> lockRequiredEvent); @PostConstruct void post(); @PreDestroy void preDestroy(); void init(LayoutEditorElement parent,
                     Integer columnWidth,
                     LayoutTemplate.Style pageStyle,
                     ParameterizedCommand<ColumnDrop> dropCommand,
                     ParameterizedCommand<ColumnDrop> removeComponentCommand,
                     ParameterizedCommand<Column> removeCommand,
                     Supplier<LayoutTemplate> currentLayoutTemplateSupplier,
                     Supplier<Boolean> lockSupplier,
                     Integer columnHeight); @Override LayoutEditorElementType geElementType(); @Override LayoutEditorElement getParentElement(); @Override List<? extends LayoutEditorElement> getChildElements(); @Override void setSelectable(boolean selectable); @Override boolean isSelected(); @Override void setSelected(boolean status); @Override Map<String, String> getProperties(); @Override void setProperty(String property, String value); @Override void removeProperty(String property); @Override void clearProperties(); @Override List<PropertyEditorCategory> getPropertyCategories(); void onDrop(ColumnDrop.Orientation orientation,
                       String dndData); boolean hasComponent(Column targetColumn); void remove(Column targetColumn); boolean canResizeLeft(); void resizeLeft(); boolean canResizeRight(); void resizeRight(); void withComponents(ComponentColumn... _columns); void setColumnHeight(Integer columnHeight); @Override UberElement<ColumnWithComponents> getView(); Integer getColumnWidth(); void setColumnWidth(Integer columnWidth); @Override void reduceWidth(); @Override void incrementWidth(); ParameterizedCommand<Column> getRemoveColumnCommand(); @Override LayoutComponent getLayoutComponent(); @Override boolean hasInnerRows(); @Override void calculateWidth(); Row getRow(); void calculateSizeChilds(); @Override void setupResize(boolean canResizeLeft,
                            boolean canResizeRight); @Override String getId(); Integer getColumnHeight(); void setId(String id); boolean shouldPreviewDrop();  }
@Test public void testOnDropComponentMove() { when(dndManager.isOnComponentMove()).thenReturn(true); columnWithComponents.onDrop(ColumnDrop.Orientation.UP, "this-is-a-requirement-to-firefox-html5dnd"); verify(lockRequiredEvent, times(1)).fire(any(LockRequiredEvent.class)); }
@Test public void testOnDropNewComponent() { when(dndManager.isOnComponentMove()).thenReturn(false); columnWithComponents.onDrop(ColumnDrop.Orientation.UP, "this-is-a-requirement-to-firefox-html5dnd"); verify(lockRequiredEvent, times(1)).fire(any(LockRequiredEvent.class)); }