### Question:
ColumnSpec { public static String toPrimaryKeyJoinSQL(ColumnSpec[] specs, String leftTableAlias, String rightTableAlias) { final String safeLeftTable = HiveUtils.quoteIdentifier(leftTableAlias); final String safeRightTable = HiveUtils.quoteIdentifier(rightTableAlias); final List<String> keys = Stream.of(specs) .filter(ColumnSpec::isPk) .map(ColumnSpec::getName) .map(HiveUtils::quoteIdentifier) .map(column -> safeLeftTable + "." + column + " = " + safeRightTable + "." + column) .collect(Collectors.toList()); return StringUtils.join(keys, " AND "); } 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 toPrimaryKeyJoinSQL() { final ColumnSpec[] specs = ColumnSpec.createFromString("col1|string|pk1|1|0|0\ncol2|int\ncol3|int|pk2|1|0|0"); Assert.assertNotNull(specs); Assert.assertEquals("`a`.`col1` = `b`.`col1` AND `a`.`col3` = `b`.`col3`", ColumnSpec.toPrimaryKeyJoinSQL(specs, "a", "b")); }