Automated test case generation enhances the efficiency and quality of software testing. Learning-based test case generation methods require an understanding of the relationships between test cases and focal methods. Accurate traceability links between test cases and focal methods provide a clear relational model, facilitating more effective training of test case generation models. However, existing techniques frequently struggle to provide precise traceability links. We conduct an empirical study on the Methods2Test dataset, which includes a wide range of test cases and corresponding focal methods, to identify the limitations of current techniques. The causes of inaccurate traceability links are divided into two categories: incorrect extraction and missed extraction. The incorrect extraction category includes method overloading errors, name matching failures, and constructor ignorance. The missed extraction category involves constructor ignorance, similar but non-identical names, and difficulties in locating test classes involving subclasses. Based on the insights from this study, we propose COACH (COmbine trACe Heuristics), an automated approach for establishing test-to-code traceability links. COACH establishes file-level and class-level links as a foundation, integrates multiple heuristics, and defines their scopes to build method-level links, improving both applicability and precision. We evaluate COACH against the M2T method (used in Methods2Test), the NC and LCBA baselines. Experimental results show that COACH outperforms other methods in terms of precision, coverage, and efficiency. In addition, we apply COACH to 19,518 real-world Java projects, creating a novel large-scale dataset called TRACETS4J (TRACE TeSt for Java). Models fine-tuned on TRACETS4J outperform those trained on the Methods2Test dataset, as shown by BLEU-4 and CodeBLEU. This demonstrates the superiority of TRACETS4J and the effectiveness of COACH in improving test case generation.