ParseInstallation extends ParseObject { public static ParseInstallation getCurrentInstallation() { try { return ParseTaskUtils.wait( getCurrentInstallationController().getAsync()); } catch (ParseException e) { return null; } } ParseInstallation(); static ParseInstallation getCurrentInstallation(); static ParseQuery<ParseInstallation> getQuery(); String getInstallationId(); @Override void setObjectId(String newObjectId); String getPushType(); void setPushType(String pushType); String getDeviceToken(); void setDeviceToken(String deviceToken);  }
@Test public void testGetCurrentInstallation() { ParseCurrentInstallationController controller = mock(ParseCurrentInstallationController.class); ParseInstallation currentInstallation = new ParseInstallation(); when(controller.getAsync()).thenReturn(Task.forResult(currentInstallation)); ParseCorePlugins.getInstance().registerCurrentInstallationController(controller); ParseInstallation installation = ParseInstallation.getCurrentInstallation(); assertEquals(currentInstallation, installation); verify(controller, times(1)).getAsync(); }