@Ashish Gupta
I'm glad that you were able to call the Get trustFrameworkPolicy API by using Postman! When it comes to implementing the Microsoft Graph API into Java, I found some links that might help you get started/gain a better understanding.
Microsoft Graph SDK for Java
Get started with Microsoft Graph and Java
Microsoft Graph and Java Examples
Build Java apps with Microsoft Graph - Tutorial
I hope this helps! If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.
----------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.