private IAdHocTransactionService transactionService;
private LabelType givenLabelTypeStored() {
Label label1 = Label.create("label-name-1");
Label label2 = Label.create("label-name-2");
final LabelType labelType = LabelType.create("label-type-name"
+ UUID.randomUUID());
labelType.addLabel(label1);
labelType.addLabel(label2);
labelTypeDAO.save(labelType);
labelTypeDAO.flush();
sessionFactory.getCurrentSession().evict(labelType);
labelType.dontPoseAsTransientObjectAnymore();
return labelType;
}