How to set up and test "Trust System CA-Signed Certificates" trust strategy?

Hi!

I tried to follow the instructions to set up a certificate on Neo4j server:

I am using Neo4j Java driver and setting the trust strategy as follows:
ConfigBuilder builder = Config.build().withTrustStrategy(TrustStrategy.trustSystemCertificates());

An exception occurs:
org.neo4j.driver.v1.exceptions.SecurityException: Failed to establish secured connection with the server
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

If I set the strategy to trust all, then it works fine. What could I have missed?

Thanks,
Arturs