BQModuleProviderChecker { protected BQModuleProvider matchingProvider() { return matchingProviders().findFirst().get(); } protected  BQModuleProviderChecker(Class<? extends BQModuleProvider> provider); static void testAutoLoadable(Class<? extends BQModuleProvider> provider); static void testMetadata(Class<? extends BQModuleProvider> provider);  }
@Test public void testMatchingProvider() { BQModuleProvider p = new BQModuleProviderChecker(P1.class).matchingProvider(); assertNotNull(p); assertTrue(p instanceof P1); }