### Question:
CapabilitiesHelper { @SuppressWarnings("unchecked") public static List<DesiredCapabilities> retrieveCustomCapsObjects() { logger.entering(); List<DesiredCapabilities> capsObjects = new ArrayList<>(); List<Object> customCapsProv = ConfigManager.getConfig(Grid.getTestSession().getXmlTestName()) .getListConfigProperty(ConfigProperty.SELENIUM_CUSTOM_CAPABILITIES_PROVIDER); if (customCapsProv == null || customCapsProv.isEmpty()) { return capsObjects; } for (Object eachProvider : customCapsProv) { String providerString = (String) eachProvider; if (StringUtils.isBlank(providerString)) { continue; } try { Class<?> provider = Class.forName(providerString); if (DefaultCapabilitiesBuilder.class.isAssignableFrom(provider)) { capsObjects.add(retrieveCustomCapabilities((Class<? extends DefaultCapabilitiesBuilder>) provider)); } else { logger.info("Skipping " + providerString + " because it is not a subclass of " + DefaultCapabilitiesBuilder.class.getCanonicalName()); } } catch (ClassNotFoundException e) { throw new IllegalStateException(e); } } logger.exiting(capsObjects); return capsObjects; } 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") @WebTest public void testRetrieveCustomCapsObjects() { StringBuilder providers = new StringBuilder(); providers.append(TestFrameWorkCapability.class.getName()) .append(",").append(TestPlatformCapability.class.getName()); ConfigManager.getConfig(Grid.getWebTestSession().getXmlTestName()) .setConfigProperty(SELENIUM_CUSTOM_CAPABILITIES_PROVIDER, providers.toString()); List<DesiredCapabilities> list = CapabilitiesHelper.retrieveCustomCapsObjects(); assertNotNull(list); assertFalse(list.isEmpty()); assertTrue(list.size() == 2); assertEquals(list.get(0).getCapability("framework"), "selion"); assertEquals(list.get(1).getCapability("platform"), "other"); }