### Question:
CapabilitiesHelper { public static List<DesiredCapabilities> retrieveCustomCapsViaServiceLoaders() { logger.entering(); ServiceLoader<DefaultCapabilitiesBuilder> allCapsBuilderInstances = ServiceLoader .load(DefaultCapabilitiesBuilder.class); List<DesiredCapabilities> allCaps = new ArrayList<>(); for (DefaultCapabilitiesBuilder eachCapsBuilderInstance : allCapsBuilderInstances) { allCaps.add(eachCapsBuilderInstance.createCapabilities()); } logger.exiting(allCaps); return allCaps; } private  CapabilitiesHelper(); static List<DesiredCapabilities> retrieveCustomCapsViaServiceLoaders(); @SuppressWarnings("unchecked") static List<DesiredCapabilities> retrieveCustomCapsObjects(); static DesiredCapabilities retrieveCustomCapabilities(String[] capabilitiesArray); @Deprecated static DesiredCapabilities retrieveCustomCapabilities(InvokedMethodInformation methodInfo); static DesiredCapabilities retrieveCustomCapabilities(Class<? extends DefaultCapabilitiesBuilder> builder);  }### Answer:
@Test(groups = "unit") public void testRetrieveCustomCapsViaServiceLoaders() { List<DesiredCapabilities> list = CapabilitiesHelper.retrieveCustomCapsViaServiceLoaders(); assertNotNull(list); assertFalse(list.isEmpty()); assertTrue(list.size() == 1); assertTrue(((String) list.get(0).getCapability("name")).contains("testRetrieveCustomCapsViaServiceLoaders")); }