@Test
public void secureTransportIsSetupByDefaultWhenAuthIsConfigured() {

    // given
    Builder builder = createTestObjectFactoryBuilder();
    builder.withAuth(XPackAuthTest.createTestBuilder().build());
    BulkProcessorObjectFactory factory = builder.build();
    // when
    ClientProvider clientProvider = factory.getClientProvider();
    // then
    Assert.assertTrue(clientProvider instanceof SecureClientProvider);
}