code: public static void assertMainThread() {
  		if (imp != null && !DispatchQueue.isMainQueue()) {
  			imp.assertFailed(StringUtils.format("Expected 'main' thread but was '%s'", Thread.currentThread().getName()));
  		}
  	}
docs: Asserts that code executes on the main thread.