Integration testes with certificates

I would like to write integration tests for my gateway which has mutual authentication: both client and server certificate are required.

with curl I can call endpoint like this:

curl -k --cert myCert.pem:changeit https:/localhost:9999/home -vv

and it works fine.

I would like to use rest assured to write some integration test. When I write them with configuration like this:

RestAssured.keyStore(keystore, "changeit");
RestAssured.trustStore(trustore, "changeit");

they work properly but it seems to me that this test is wrong.

In my test I would like to use clientCert.pem. auth().certificate() in rest assured takes URL to JKS keystore so I have converted myCert.pem to clientKeystore.jks but with below configuration it doesn't work.

            .certificate("clientKeystore.jks", "changeit")
            .response(); PKIX path building failed: unable to 
find valid certification path to requested target

I am novice to SSL and I cannot figure out how to fix it.