CachedCurrentInstallationController implements ParseCurrentInstallationController { @Override public void clearFromDisk() { synchronized (mutex) { currentInstallation = null; } try { installationId.clear(); ParseTaskUtils.wait(store.deleteAsync()); } catch (ParseException e) { } } CachedCurrentInstallationController(
            ParseObjectStore<ParseInstallation> store, InstallationId installationId); @Override Task<Void> setAsync(final ParseInstallation installation); @Override Task<ParseInstallation> getAsync(); @Override Task<Boolean> existsAsync(); @Override void clearFromMemory(); @Override void clearFromDisk(); @Override boolean isCurrent(ParseInstallation installation);  }
@Test public void testClearFromDisk() { InstallationId installationId = mock(InstallationId.class); ParseObjectStore<ParseInstallation> store = mock(ParseObjectStore.class); when(store.deleteAsync()).thenReturn(Task.<Void>forResult(null)); CachedCurrentInstallationController controller = new CachedCurrentInstallationController(store, installationId); controller.currentInstallation = mock(ParseInstallation.class); controller.clearFromDisk(); assertNull(controller.currentInstallation); verify(store, times(1)).deleteAsync(); verify(installationId, times(1)).clear(); }