### Question:
ParseRESTCommand extends ParseRequest<JSONObject> { public void releaseLocalIds() { if (localId != null) { getLocalIdManager().releaseLocalIdOnDisk(localId); } try { ArrayList<JSONObject> localPointers = new ArrayList<>(); getLocalPointersIn(jsonParameters, localPointers); for (JSONObject pointer : localPointers) { String localId = (String) pointer.get("localId"); getLocalIdManager().releaseLocalIdOnDisk(localId); } } catch (JSONException e) { } } ParseRESTCommand(
      String httpPath,
      ParseHttpRequest.Method httpMethod,
      Map<String, ?> parameters,
      String sessionToken);  ParseRESTCommand(
      String httpPath,
      ParseHttpRequest.Method httpMethod,
      JSONObject jsonParameters,
      String sessionToken); private  ParseRESTCommand(
      String httpPath,
      ParseHttpRequest.Method httpMethod,
      JSONObject jsonParameters,
      String localId, String sessionToken);   ParseRESTCommand(Init<?> builder); static ParseRESTCommand fromJSONObject(JSONObject jsonObject); @Override Task<JSONObject> executeAsync(
      final ParseHttpClient client,
      final ProgressCallback uploadProgressCallback,
      final ProgressCallback downloadProgressCallback,
      final Task<Void> cancellationToken); String getCacheKey(); JSONObject toJSONObject(); String getSessionToken(); String getOperationSetUUID(); void setLocalId(String localId); String getLocalId(); void resolveLocalIds(); void retainLocalIds(); void releaseLocalIds(); public String masterKey; }### Answer:
@Test public void testReleaseLocalIds() { LocalIdManager localIdManager = mock(LocalIdManager.class); when(localIdManager.createLocalId()).thenReturn("localIdAgain"); ParseCorePlugins.getInstance().registerLocalIdManager(localIdManager); ParseObject object = new ParseObject("Test"); object.put("key", "value"); String httpPath = "www.parse.com"; JSONObject jsonParameters = PointerOrLocalIdEncoder.get().encodeRelatedObject(object); String sessionToken = "sessionToken"; String localId = "localId"; ParseRESTCommand command = new ParseRESTCommand.Builder() .httpPath(httpPath) .jsonParameters(jsonParameters) .method(ParseHttpRequest.Method.POST) .sessionToken(sessionToken) .localId(localId) .build(); command.releaseLocalIds(); verify(localIdManager, times(1)).releaseLocalIdOnDisk(localId); verify(localIdManager, times(1)).releaseLocalIdOnDisk("localIdAgain"); }