### Question:
MobileImplementationFinder { public static <T extends MobileElement> T instantiate(WebDriverPlatform platform, Class<T> tClass, String locator) { try { final Class<T> mobileElementClass = find(tClass, platform); final Constructor<T> constructor = mobileElementClass.getConstructor(String.class); return constructor.newInstance(locator); } catch (ClassCastException | ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new MobileObjectInstantiationException(String.format( "Problem instantiating class %s for platform %s", tClass.getName(), platform), e); } } private  MobileImplementationFinder(); static T instantiate(WebDriverPlatform platform, Class<T> tClass, String locator);  }### Answer:
@Test(groups = "unit") public void testInstantiateDirectClass() throws Exception { final MobileElement button = MobileImplementationFinder.instantiate(WebDriverPlatform.UNDEFINED, UiButton.class, " Assert.assertEquals(button.getLocator(), " Assert.assertEquals(button.getClass(), UiButton.class, "wrong class associated"); }