code: protected static Capabilities substituteMobilePlatform(Capabilities originalCapabilities,
          String newPlatform) {
          DesiredCapabilities dc = new DesiredCapabilities(originalCapabilities);
          dc.setCapability(PLATFORM_NAME, newPlatform);
          return dc;
      }
docs: Changes platform name and returns new capabilities.
  
  @param originalCapabilities the given {@link Capabilities}.
  @param newPlatform a {@link MobileCapabilityType#PLATFORM_NAME} value which has
  to be set up
  @return {@link Capabilities} with changed mobile platform value