public static void onDestroy() {
    if (ScreenshotImpl.hasBeenCreated()) {
      ScreenshotImpl.getInstance().flush();
    }

    Registry.clear();
  }
Call this exactly once after all your tests have run.

<p>Typically this can be in {@code AndroidJUnitRunner#finish()}
core/src/main/java/com/facebook/testing/screenshot/ScreenshotRunner.java