I have multiple modules within same project which needs to communicate with entirely 2 different REST API systems. I want to use Rest Assured for both. The problem I am facing here is if I use the code for setting the baseuri (RestAssured.baseURI) it will override the previous baseURI. I tried to search how people have managed this situation. For single uri I use below:
RestAssured.baseURI = properties.getProperty("baseURI");
with the static import of RestAssured, but if I have two it overwrites the first one. Any suggestion? I didn't want to use requestspecbuilder itself to do it as below:
RequestSpecBuilder requestSpecBuilder = new RequestSpecBuilder();
requestSpecBuilder.setAccept(ContentType.JSON);
requestSpecBuilder.setContentType(ContentType.JSON);
requestSpecBuilder.baseUri = url;
as I would need to do it everytime I create a new specbuilder.
I am using Rest Assured 2.4.1. Thanks for your help in advance.