ParseInstallation extends ParseObject { @Override public void setObjectId(String newObjectId) { throw new RuntimeException("Installation's objectId cannot be changed"); } 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(expected = RuntimeException.class) public void testInstallationObjectIdCannotBeChanged() { boolean hasException = false; ParseInstallation installation = new ParseInstallation(); try { installation.put("objectId", "abc"); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().contains("Cannot modify")); hasException = true; } assertTrue(hasException); installation.setObjectId("abc"); }