The transaction template is necessary because repositories are transactional by default and the results of repository methods might return entities with non-initialized collections. You must not annotate tests or their classes with ``@Transactional`` because this would cause a test-wide transaction and no revision information would be written to the database.