code: public AppiumServiceBuilder withCapabilities(DesiredCapabilities capabilities) {
          if (this.capabilities == null) {
              this.capabilities = capabilities;
          } else {
              DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
              desiredCapabilities.merge(this.capabilities).merge(capabilities);
              this.capabilities = desiredCapabilities;
          }
          return this;
      }
docs: Adds a desired capabilities.
  
  @param capabilities is an instance of {@link DesiredCapabilities}.
  @return the self-reference.