It is a part of the Spring Framework's utility package. It provides static methods to perform file copy operations. This utility offer's methods for copying the contents of an InputStream to an OutputStream, as well as copying the contents of a file to another file or stream.
Copying contents from a file to a variable of String type.
Create 2 sample files (for e.g. SampleXmlResponse.xml and SampleJsonResponse.json) inside mocks folder.
SampleJsonResponse.json
SampleXmlResponse.xml
"getWeatherResponse": {
"location": "New York",
"temperature": "75°F",
"conditions": "Sunny"