@Test
public void testToSqlString() {

  WindowSpecification windowSpecification =
      WindowSpecification.builder()
          .setWindowName("mainWindow")
          .setSort(Sort.on("col1", Sort.Order.ASCEND).next("col2", Sort.Order.DESCEND))
          .setPartitionColumns(ImmutableList.of("col1", "col2"))
          .build();
  String expected =
      "PARTITION BY col1, col2" + System.lineSeparator() + "ORDER BY col1 ASC, col2 DESC";
  assertEquals(expected, windowSpecification.toSqlString());
}