void startBp()

in src/it/java/com/epam/digital/data/platform/bpwebservice/it/wsendpoint/StartBpEndpointIT.java [41:61]


  void startBp() {
    mockPutCephStartForm("happyPathBusinessProcess",
        fileContent("/startBp/happyPath/json/cephContent.json").replaceAll("[ \r\n]", ""));

    bpmsMockServer.addStubMapping(stubFor(
        post(urlPathEqualTo("/api/process-definition/key/happyPathBusinessProcess/start"))
            .withHeader("X-Access-Token", equalTo("token"))
            .withRequestBody(matching(
                fileContent("/startBp/happyPath/json/startProcessBpRequestRegex.json")
                    .replaceAll("[ \r\n]", "")
                    .replaceAll("\\{", "\\\\{")))
            .willReturn(aResponse().withStatus(200)
                .withHeader("Content-Type", "application/json")
                .withBody(fileContent("/startBp/happyPath/json/bpmsStartProcessBpResponse.json")))));

    var requestEnvelope = fileSource("/startBp/happyPath/xml/startBpRequest.xml");
    var responseEnvelope = fileSource("/startBp/happyPath/xml/startBpResponse.xml");
    mockClient().sendRequest(withSoapEnvelope(requestEnvelope))
        .andExpect(noFault())
        .andExpect(soapEnvelope(responseEnvelope));
  }