InstantRunAnalyticsHelper { @VisibleForTesting @NonNull static AndroidStudioStats.InstantRunStatus.BuildMode convert( @NonNull InstantRunBuildMode mode) { switch (mode) { case HOT_WARM: return AndroidStudioStats.InstantRunStatus.BuildMode.HOT_WARM; case COLD: return AndroidStudioStats.InstantRunStatus.BuildMode.COLD; case FULL: return AndroidStudioStats.InstantRunStatus.BuildMode.FULL; default: return AndroidStudioStats.InstantRunStatus.BuildMode.UNKNOWN_BUILD_MODE; } } private  InstantRunAnalyticsHelper(); @NonNull static AndroidStudioStats.InstantRunStatus generateAnalyticsProto(
            @NonNull InstantRunBuildContext instantRunBuildContext);  }
@Test public void checkBuildModeEnum() { for (InstantRunBuildMode mode : InstantRunBuildMode.values()) { assertEquals(mode.toString(), InstantRunAnalyticsHelper.convert(mode).toString()); } }
@Test public void checkPatchingPolicyEnum() { for (InstantRunPatchingPolicy policy : InstantRunPatchingPolicy.values()) { assertEquals(policy.toString(), InstantRunAnalyticsHelper.convert(policy).toString()); } assertEquals(AndroidStudioStats.InstantRunStatus.PatchingPolicy.UNKNOWN_PATCHING_POLICY, InstantRunAnalyticsHelper.convert((InstantRunPatchingPolicy) null)); }
@Test public void checkVerifierStatusEnum() { for (InstantRunVerifierStatus status : InstantRunVerifierStatus.values()) { assertEquals(status.toString(), InstantRunAnalyticsHelper.convert(status).toString()); } assertEquals(AndroidStudioStats.InstantRunStatus.VerifierStatus.UNKNOWN_VERIFIER_STATUS, InstantRunAnalyticsHelper.convert((InstantRunVerifierStatus) null)); }