public void runTestOnMethod(MediaPlayerMethodUnderTest testMethod){
  mMethodUnderTest=testMethod;
  if (mMethodUnderTest != null) {
    initializeMessageLooper();
synchronized (lock) {
      try {
        lock.wait(WAIT_FOR_COMMAND_TO_COMPLETE);
      }
 catch (      Exception e) {
        Log.v(TAG,"runTestOnMethod: wait was interrupted.");
      }
    }
    assertTrue(mInitialized);
    checkMethodUnderTestInAllPossibleStates();
    terminateMessageLooper();
    assertTrue(mOnCompletionHasBeenCalled);
    mMethodUnderTest.checkStateErrors(mStateErrors);
    cleanUp();
  }
}

public void runTestOnMethod ( MediaPlayerMethodUnderTest testMethod ) { mMethodUnderTest = testMethod ; if ( mMethodUnderTest != null ) { initializeMessageLooper ( ) ; synchronized ( lock ) { try { lock . wait ( WAIT_FOR_COMMAND_TO_COMPLETE ) ; } catch ( Exception e ) { Log . v ( TAG , "runTestOnMethod: wait was interrupted." ) ; } } assertTrue ( mInitialized ) ; checkMethodUnderTestInAllPossibleStates ( ) ; terminateMessageLooper ( ) ; assertTrue ( mOnCompletionHasBeenCalled ) ; mMethodUnderTest . checkStateErrors ( mStateErrors ) ; cleanUp ( ) ; } }
runs the given method under test in all possible states of a mediaplayer object .
