WindowSpecification { static Builder builder() { return new Builder(); } private  WindowSpecification(String windowName, Set<String> partitionColumns, Sort sort); String toSqlString(); boolean isEmpty(); @Override String toString(); String getWindowName(); Set<String> getPartitionColumns(); Optional<Sort> getSort(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void partitionDuplicates() { Throwable thrown = assertThrows( IllegalArgumentException.class, () -> WindowSpecification.builder() .setPartitionColumns(ImmutableList.of("col1", "col1")) .build()); assertTrue(thrown.getMessage().contains("duplicate columns")); }