For Spring Boot applications, MockMvc is the standard tool to verify that the HTTP response is configured correctly for a download.
Ensuring the logic generates the correct byte stream.
Avoid testing multi-gigabyte downloads in standard unit tests to keep CI/CD pipelines fast. Use small "stub" files instead.