code: def test_with_watermark_alignment(self):
      jvm = get_gateway().jvm
      j_watermark_strategy = (
          WatermarkStrategy.no_watermarks()
          .with_watermark_alignment(
              "alignment-group-1",
              Duration.of_seconds(20),
              Duration.of_seconds(10),
          )
          ._j_watermark_strategy
      )
      self.assertTrue(
          is_instance_of(
              j_watermark_strategy,
              jvm.org.apache.flink.api.common.eventtime.WatermarksWithWatermarkAlignment,
          )
      )
      alignment_parameters = (
          j_watermark_strategy.getAlignmentParameters()
      )
      self.assertEqual(
          alignment_parameters.getWatermarkGroup(), "alignment-group-1"
      )
      self.assertEqual(
          alignment_parameters.getMaxAllowedWatermarkDrift(), 20000
      )
      self.assertEqual(alignment_parameters.getUpdateInterval(), 10000)
  
file_path: flink/flink-python/pyflink/common/tests/test_watermark_strategy.py
imports: from pyflink.common import Duration
  from pyflink.common.watermark_strategy import WatermarkStrategy
  from pyflink.java_gateway import get_gateway
  from pyflink.util.java_utils import is_instance_of, get_field_value
  from pyflink.testing.test_case_utils import PyFlinkTestCase
label_desc: Use image node_id 2 for calling the WatermarkStrategyTests obj's underlying member method code with example usage: obj.test_with_watermark_alignment() without return types