use of com.amazon.dataprepper.plugins.source.loghttp.HTTPSourceConfig in project data-prepper by opensearch-project.
the class CertificateProviderFactoryTest method getFileCertificateProviderSuccess.
@Test
public void getFileCertificateProviderSuccess() {
final HTTPSourceConfig sourceConfig = mock(HTTPSourceConfig.class);
when(sourceConfig.isSsl()).thenReturn(true);
when(sourceConfig.getSslCertificateFile()).thenReturn(TEST_SSL_CERTIFICATE_FILE);
when(sourceConfig.getSslKeyFile()).thenReturn(TEST_SSL_KEY_FILE);
final CertificateProviderFactory certificateProviderFactory = new CertificateProviderFactory(sourceConfig);
final CertificateProvider certificateProvider = certificateProviderFactory.getCertificateProvider();
assertThat(certificateProvider, IsInstanceOf.instanceOf(FileCertificateProvider.class));
}
Aggregations