@Test
public void builderThrowsIfCantReadKey() {

    // given
    PEMCertInfo testCertInfo = createTestCertInfoBuilder()
            .withKeyPath(TEST_KEY_PATH_WITH_PASSPHRASE)
            .withKeyPassphrase("")
            .build();
    expectedException.expect(ConfigurationException.class);
    expectedException.expectMessage(PEMCertInfo.configExceptionMessage);
    // when
    testCertInfo.applyTo(mock(HttpClientConfig.Builder.class));
}