SQLUpdateClause update = new SQLUpdateClause(null, SQLTemplates.DEFAULT, emp1);
update.set(emp1.superiorId, new SQLSubQuery().from(emp2)
.where(emp2.id.eq(emp1.id))
.unique(emp2.id));
SQLBindings sql = update.getSQL().get(0);
assertEquals("update EMPLOYEE\n" +
"set SUPERIOR_ID = (select emp2.ID\n" +
"from EMPLOYEE emp2\n" +
"where emp2.ID = EMPLOYEE.ID)", sql.getSQL());
}