question: static StackTraceElement findTestClassTraceElement ( StackTraceElement [ ] trace ) { for ( int i = trace . length - 1 ; i >= 0 ; i -- ) { StackTraceElement element = trace [ i ] ; if ( TEST_CASE_CLASS . equals ( element . getClassName ( ) ) && TEST_CASE_METHOD . equals ( element . getMethodName ( ) ) ) { return trace [ i - 3 ] ; } } throw new IllegalArgumentException ( "Could not find test class!" ) ; }
target:  Returns the test class element by looking at the method InstrumentationTestCase invokes.