fix test testCalculateTimeGradient