protected boolean isTestThread(){
  assertNotNull("Test case thread not set?",threadAndTestNameRule.testCaseThread);
  return Thread.currentThread() == threadAndTestNameRule.testCaseThread;
}

protected boolean isTestThread ( ) { assertNotNull ( "Test case thread not set?" , threadAndTestNameRule . testCaseThread ) ; return Thread . currentThread ( ) == threadAndTestNameRule . testCaseThread ; }
returns true if and only if the calling thread is the primary thread executing the test case .
