public void validate() throws TelegramApiException {
        if (useHttps) {
            File file = new File(keyStorePath);
            if (!file.exists() || !file.canRead()) {
                throw new TelegramApiException("Can't find or access server keystore file.");
            }
        }
    }
@Test
    public void testWhenHttpsEnabledKeyStoreFileMustBePresent() {
        WebhookOptions webhookOptions = new WebhookOptions();
        webhookOptions.setUseHttps(true);
        webhookOptions.setKeyStorePath(temporaryKeyStoreFile.getAbsolutePath());
        try {
            webhookOptions.validate();
        } catch (TelegramApiException e) {
            fail("Exception raised during Https webhook options validation");
        }
    }