// Path: driver/src/com/leandog/brazenhead/exceptions/IsNotAListViewItem.java
// @SuppressWarnings("unused")
// public class IsNotAListViewItem extends Exception {
//     private static final long serialVersionUID = 1L;
//     private final View theView;
// 
//     public IsNotAListViewItem(final View theView) {
//         this.theView = theView;
//     }
// 
// }
// 
// Path: units/src/com/leandog/brazenhead/test/BrazenheadTestRunner.java
// public class BrazenheadTestRunner extends RobolectricTestRunner {
// 
//     public BrazenheadTestRunner(Class<?> testClass) throws InitializationError {
//         super(testClass, new File("../driver"));
//     }
//     
//     @Override
//     public Object createTest() throws Exception {
//         Object theTest = super.createTest();
//         MockitoAnnotations.initMocks(theTest);
//         return theTest;
//     }
//     
//     @Override
//     public void beforeTest(Method method) {
//         bindShadowClass(ShadowInstrumentationTestCase.class);
//     }
// 
// }
// 
// Path: driver/src/com/robotium/solo/BrazenheadSleeper.java
// public class BrazenheadSleeper extends Sleeper {
//     
//     @Override
//     public void sleep() {
//         super.sleep();
//     }
//     
//     @Override
//     public void sleepMini() {
//         super.sleepMini();
//     }
// }


import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import java.util.ArrayList;
import org.junit.*;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import org.mockito.*;
import android.app.Instrumentation;
import android.view.*;
import android.widget.*;
import com.leandog.brazenhead.exceptions.IsNotAListViewItem;
import com.leandog.brazenhead.test.BrazenheadTestRunner;
import com.robotium.solo.BrazenheadSleeper;
import com.robotium.solo.Solo;
                if (throwOnKeyEvents) {
                    throw new SecurityException();
                }

                super.sendKeyDownUpSync(key);
            }

            public void setToThrowOnKeyEvents() {
                throwOnKeyEvents = true;
            }
        }
    }

    @RunWith(BrazenheadTestRunner.class)
    public static class FindingByText {
        @Mock Instrumentation instrumentation;
        @Mock Solo solo;
        @Mock TextView theFoundText;
        @Mock BrazenheadSleeper sleeper;

        private ListItemFinder listItemFinder;

        @Before
        public void setUp() {
            TestRunInformation.setSolo(solo);
            when(solo.waitForText(anyString())).thenReturn(true);
            listItemFinder = new ListItemFinder(instrumentation, solo, sleeper);
        }

        @Test
// Path: driver/src/com/leandog/brazenhead/exceptions/IsNotAListViewItem.java
// @SuppressWarnings("unused")
// public class IsNotAListViewItem extends Exception {
//     private static final long serialVersionUID = 1L;
//     private final View theView;
// 
//     public IsNotAListViewItem(final View theView) {
//         this.theView = theView;
//     }
// 
// }
// 
// Path: units/src/com/leandog/brazenhead/test/BrazenheadTestRunner.java
// public class BrazenheadTestRunner extends RobolectricTestRunner {
// 
//     public BrazenheadTestRunner(Class<?> testClass) throws InitializationError {
//         super(testClass, new File("../driver"));
//     }
//     
//     @Override
//     public Object createTest() throws Exception {
//         Object theTest = super.createTest();
//         MockitoAnnotations.initMocks(theTest);
//         return theTest;
//     }
//     
//     @Override
//     public void beforeTest(Method method) {
//         bindShadowClass(ShadowInstrumentationTestCase.class);
//     }
// 
// }
// 
// Path: driver/src/com/robotium/solo/BrazenheadSleeper.java
// public class BrazenheadSleeper extends Sleeper {
//     
//     @Override
//     public void sleep() {
//         super.sleep();
//     }
//     
//     @Override
//     public void sleepMini() {
//         super.sleepMini();
//     }
// }


// Path: units/src/com/leandog/brazenhead/ListItemFinderTest.java
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import java.util.ArrayList;
import org.junit.*;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import org.mockito.*;
import android.app.Instrumentation;
import android.view.*;
import android.widget.*;
import com.leandog.brazenhead.exceptions.IsNotAListViewItem;
import com.leandog.brazenhead.test.BrazenheadTestRunner;
import com.robotium.solo.BrazenheadSleeper;
import com.robotium.solo.Solo;

                if (throwOnKeyEvents) {
                    throw new SecurityException();
                }

                super.sendKeyDownUpSync(key);
            }

            public void setToThrowOnKeyEvents() {
                throwOnKeyEvents = true;
            }
        }
    }

    @RunWith(BrazenheadTestRunner.class)
    public static class FindingByText {
        @Mock Instrumentation instrumentation;
        @Mock Solo solo;
        @Mock TextView theFoundText;
        @Mock BrazenheadSleeper sleeper;

        private ListItemFinder listItemFinder;

        @Before
        public void setUp() {
            TestRunInformation.setSolo(solo);
            when(solo.waitForText(anyString())).thenReturn(true);
            listItemFinder = new ListItemFinder(instrumentation, solo, sleeper);
        }

        @Test
        public void itIndicatesIfNoTextIsFound() throws IsNotAListViewItem {