### Question:
ColumnSpec { public static String[] toPrimaryKeys(ColumnSpec[] specs) { return Stream.of(specs) .filter(ColumnSpec::isPk) .map(ColumnSpec::getName) .map(HiveUtils::quoteIdentifier) .toArray(String[]::new); } ColumnSpec(String name, String dataType, String comment);  ColumnSpec(String name, String dataType, String comment, boolean pk, boolean createDt, boolean modifiedDt);  ColumnSpec(ColumnSpec other);  ColumnSpec(String name, String dataType, String comment, boolean pk, boolean createDt, boolean modifiedDt, String otherColumnName); static String toPrimaryKeyJoinSQL(ColumnSpec[] specs, String leftTableAlias, String rightTableAlias); static String[] toPrimaryKeys(ColumnSpec[] specs); static ColumnSpec[] createFromString(String specString); String getName(); void setName(String name); String getComment(); void setComment(String comment); String getDataType(); void setDataType(String dataType); boolean isPk(); void setPk(boolean pk); boolean isCreateDt(); void setCreateDt(boolean createDt); boolean isModifiedDt(); void setModifiedDt(boolean modifiedDt); String toCreateSQL(); String toCreateSQL(boolean strings); String toPartitionSQL(); String getOtherColumnName();  }### Answer:
@Test public void toPrimaryKeys() { final ColumnSpec[] specs = ColumnSpec.createFromString("col1|string|pk1|1|0|0\ncol2|int\ncol3|int|pk2|1|0|0"); Assert.assertNotNull(specs); Assert.assertArrayEquals(new String[]{"`col1`", "`col3`"}, ColumnSpec.toPrimaryKeys(specs)); }