### Question:
ParseInstallation extends ParseObject { @Override Task<Void> handleSaveResultAsync(ParseObject.State result, ParseOperationSet operationsBeforeSave) { Task<Void> task = super.handleSaveResultAsync(result, operationsBeforeSave); if (result == null) { return task; } return task.onSuccessTask(new Continuation<Void, Task<Void>>() { @Override public Task<Void> then(Task<Void> task) throws Exception { return getCurrentInstallationController().setAsync(ParseInstallation.this); } }); } ParseInstallation(); static ParseInstallation getCurrentInstallation(); static ParseQuery<ParseInstallation> getQuery(); String getInstallationId(); @Override void setObjectId(String newObjectId);  }### Answer:
@Test public void testHandleSaveResultAsync() throws Exception { ParseCurrentInstallationController controller = mock(ParseCurrentInstallationController.class); when(controller.setAsync(any(ParseInstallation.class))).thenReturn(Task.<Void>forResult(null)); ParseCorePlugins.getInstance().registerCurrentInstallationController(controller); ParseInstallation.State state = new ParseInstallation.State.Builder("_Installation") .put("key", "value") .build(); ParseInstallation installation = new ParseInstallation(); installation.put("keyAgain", "valueAgain"); ParseOperationSet operationSet = installation.startSave(); ParseTaskUtils.wait(installation.handleSaveResultAsync(state, operationSet)); assertEquals("value", installation.get("key")); assertEquals("valueAgain", installation.get("keyAgain")); verify(controller, times(1)).setAsync(installation); }