class ForumServiceImpl implements ForumService {

    @Override
    public Message splitThread(Identity updater, final Message msg) {
        Message newTopMessage = null;
        if (msg.getThreadtop() == null) {
            newTopMessage = msg;
        } else {
            // it only make sense to split a thread if the current message is not a threadtop message.
            final List<Message> threadList = this.getThread(msg.getThreadtop().getKey());
            final List<Message> subthreadList = new ArrayList<Message>();
            subthreadList.add(msg);
            getSubthread(msg, threadList, subthreadList);

            final Iterator<Message> messageIterator = subthreadList.iterator();
            Message firstMessage = null;

            if (messageIterator.hasNext()) {
                firstMessage = messageIterator.next();
                firstMessage = forumDao.loadMessage(firstMessage);
                firstMessage.setParent(null);
                firstMessage.setThreadtop(null);
                this.updateMessage(updater, firstMessage, false, new ForumChangedEvent("split"), PublishEventTO.getNoPublishInstance());
                newTopMessage = firstMessage;
            }
            while (firstMessage != null && messageIterator.hasNext()) {
                Message message = messageIterator.next();
                message = forumDao.loadMessage(message);
                message.setThreadtop(firstMessage);
                this.updateMessage(updater, message, false, null, PublishEventTO.getNoPublishInstance());
            }
        }
        return newTopMessage;
    }

      ForumServiceImpl();
      ForumServiceImpl(ForumDao forumManagerMock);

}