+ @BeforeAll
+ public static void setup() throws JsonProcessingException {
+ ObjectMapper objectMapper = new ObjectMapper();
+ List<BabelArtifact> artifacts = List.of(
+ new BabelArtifact("art1", null, ""),
+ new BabelArtifact("art2", null, ""),
+ new BabelArtifact("art3", null, ""));
+ WireMock.stubFor(
+ WireMock.post(WireMock.urlEqualTo("/services/babel-service/v1/app/generateArtifacts"))
+ .withHeader("X-TransactionId", WireMock.equalTo("Test-Transaction-ID-BabelClient"))
+ .withHeader("X-FromAppId", WireMock.equalTo("ModelLoader"))
+ .withRequestBody(WireMock.matchingJsonPath("$.artifactName", WireMock.equalTo("service-Vscpass-Test")))
+ .withRequestBody(WireMock.matchingJsonPath("$.artifactVersion", WireMock.equalTo("1.0")))
+ .withRequestBody(WireMock.matchingJsonPath("$.csar", WireMock.matching(".*")))
+ .willReturn(
+ WireMock.aResponse()
+ .withHeader("Content-Type", "application/json")
+ .withBody(objectMapper.writeValueAsString(artifacts))));