Exploiting Test Structure to Enhance Language Models for Software Testing