private static void invokeUnchecked(View view, String methodName) {
    try {
      Method method = View.class.getDeclaredMethod(methodName);
      method.setAccessible(true);
      method.invoke(view);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
Similar to dispatchAttach, except dispatchest the corresponding detach.
core/src/main/java/com/facebook/testing/screenshot/WindowAttachment.java