Added template tests. #5976