@@ -0,0 +1,1987 @@
+package com.mindbodyonline.ironhide.Infrastructure.MindbodyViews;%0A%0Aimport android.view.View;%0A%0Aimport com.google.android.apps.common.testing.ui.espresso.ViewAction;%0Aimport com.google.android.apps.common.testing.ui.espresso.ViewAssertion;%0Aimport com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions;%0Aimport com.mindbodyonline.ironhide.PageObjects.PageObject;%0A%0Aimport org.hamcrest.Matcher;%0A%0Aimport static com.google.android.apps.common.testing.ui.espresso.Espresso.onView;%0Aimport static com.google.android.apps.common.testing.ui.espresso.matcher.RootMatchers.DEFAULT;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.Matchers.not;%0A%0A/**%0A * Extends MindbodyView%0A * Simple element that allows to access views that are not in the default root%0A * defined by Espresso.RootMatchers%0A * Use this when the element is not a child of the default root.%0A *%0A * @param %3CT%3E The model the current element will return when interacted with%0A */%0Apublic class AlternateRootView%3CT%3E extends MindbodyView%3CT%3E %7B%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    protected T performAction(ViewAction viewAction) %7B%0A        onView(getSelector()).inRoot(not(is(DEFAULT))).perform(viewAction);%0A        return returnGeneric();%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    protected %3CE extends PageObject%3E E  performAction(Class%3CE%3E type, ViewAction viewAction) %7B%0A        onView(getSelector()).inRoot(not(is(DEFAULT))).perform(viewAction);%0A        return returnGeneric(type);%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    protected T checkAssertion(ViewAssertion viewAssertion) %7B%0A        onView(getSelector()).inRoot(not(is(DEFAULT))).check(viewAssertion);%0A        return returnGeneric();%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    protected %3CE extends PageObject%3E E checkMatches(Class%3CE%3E type, Matcher%3C? super View%3E viewMatcher) %7B%0A        onView(getSelector()).inRoot(not(is(DEFAULT))).check(ViewAssertions.matches(viewMatcher));%0A        return returnGeneric(type);%0A    %7D%0A%7D%0A

Clean implementation