@Test
public void paramsArePassedToConfiguredObject() {

    // given
    PEMCertInfo certInfo = createTestCertInfoBuilder()
            .withKeyPath(TEST_KEY_PATH)
            .withKeyPassphrase(TEST_KEY_PASSPHRASE)
            .withClientCertPath(TEST_CLIENT_CERT_PATH)
            .withCaPath(TEST_CA_PATH)
            .build();
    Settings.Builder settings = Settings.builder();
    // when
    certInfo.applyTo(settings);
    // then
    Assert.assertEquals(TEST_KEY_PATH, settings.get(PEMCertInfo.XPACK_SSL_KEY));
    Assert.assertEquals(TEST_KEY_PASSPHRASE, settings.get(PEMCertInfo.XPACK_SSL_KEY_PASSPHRASE));
    Assert.assertEquals(TEST_CLIENT_CERT_PATH, settings.get(PEMCertInfo.XPACK_SSL_CERTIFICATE));
    Assert.assertEquals(TEST_CA_PATH, settings.get(PEMCertInfo.XPACK_SSL_CERTIFICATE_AUTHORITIES));
}