Пример #1
0
  @Test
  public void allows_specifying_trust_store_statically() throws Exception {

    InputStream keyStoreStream =
        Thread.currentThread()
            .getContextClassLoader()
            .getResourceAsStream("truststore_cloudamqp.jks");
    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
    keyStore.load(keyStoreStream, "cloud1234".toCharArray());

    RestAssured.trustStore(keyStore);

    try {
      get("https://bunny.cloudamqp.com/api/").then().statusCode(200);
    } finally {
      RestAssured.reset();
    }
  }