Testing patterns for software transactional memory engines