document = createDocument();
createSelectionModel(document);
}
private void createSelectionModel(Document document) {
Buffer buffer = EasyMock.createNiceMock(Buffer.class);
ListenerManager<MouseDragListener> listener = ListenerManager.create();
expect(buffer.getMouseDragListenerRegistrar()).andReturn(listener).anyTimes();
replay(buffer);
model = SelectionModel.create(document, buffer);
model.setSelection(document.getFirstLineInfo(), 0, document.getFirstLineInfo(), 0);
}