@Test
public void appliesCertInfoIfConfigured() {

    // given
    CertInfo<HttpClientConfig.Builder> certInfo = Mockito.mock(CertInfo.class);
    HttpClientConfig.Builder settingsBuilder = createDefaultClientConfigBuilder();
    XPackAuth xPackAuth = createTestBuilder()
            .withCertInfo(certInfo)
            .build();
    // when
    xPackAuth.configure(settingsBuilder);
    // then
    verify(certInfo).applyTo(builderArgumentCaptor.capture());
    Assert.assertEquals(settingsBuilder, builderArgumentCaptor.getValue());
}