I need to test csv file download using REST webservice Jersey(JAX-RS) in java when the url is called using the tool postman. But File is not downloaded in postman. What is the best way to do it?
Not enough detail in the question.
According to Postman docs (https://www.getpostman.com/docs/responses): "If your API endpoint returns an image, Postman will detect and render it automatically. For binary response types, you should select “Send and download” which will let you save the response to your hard disk. You can then view it using the appropriate viewer. This gives you the flexibility to test audio files, PDFs, zip files or anything that the API throws at you."
So it should be doable, but you're probably doing something wrong.
If you don't want to use Postman, you can just copy the URL that triggers the download and then use it in any test script you want, written in any language. For example, Python + requests library.