@Test
public void testPreferredCollectorClientNotAvailable() {

    final List<String> log = new ArrayList<>();
    CollectorClientProvider provider = CollectorClientProvider.provider(
        Options.CollectorClient.HTTP, new Warner() {
            @Override
            public void warn(String message) {
                log.add(message);
            }
            @Override
            public void error(String message) {
                log.add(message);
            }
        });
    assertNotNull(provider);
    assertEquals(GrpcCollectorClientProvider.provider().getClass(), provider.getClass());
    assertEquals(Collections.singletonList(
        "expected HTTP collector client was not present in classpath. Using GRPC instead."), log);
}