@Override
public CommandProcessingResult deleteGroup(final Long groupId) {
final Group groupForDelete = this.groupRepository.findOneWithNotFoundDetection(groupId);
if (groupForDelete.isNotPending()) { throw new GroupMustBePendingToBeDeletedException(groupId); }
final List<Note> relatedNotes = this.noteRepository.findByGroupId(groupId);
this.noteRepository.deleteInBatch(relatedNotes);
this.groupRepository.delete(groupForDelete);