code: public CMAUiExtension update(CMAUiExtension extension) {
      assertNotNull(extension, "extension");
      final Integer version = getVersionOrThrow(extension, "update");
      final String id = getResourceIdOrThrow(extension, "extension");
      final String spaceId = getSpaceIdOrThrow(extension, "extension");
      assertNotNull(extension.getEnvironmentId(), "environmentId");
      final String environmentId = extension.getEnvironmentId();
  
      final CMASystem system = extension.getSystem();
      extension.setSystem(null);
  
      try {
        return service.update(spaceId, environmentId, id, extension, version).blockingFirst();
      } finally {
        extension.setSystem(system);
      }
    }
docs: Update a ui extension.
  
  @param extension the ui extension to be updated.
  @return the updated ui extension.
  @throws IllegalArgumentException if extension is null.
  @throws IllegalArgumentException if extension's version is null.
  @throws IllegalArgumentException if extension's id is null.
  @throws IllegalArgumentException if extension's spaceId is null.
  @throws IllegalArgumentException if extension's environment is null.