@Test
public void testAddJoin() throws JSQLParserException {

	Select select = (Select)CCJSqlParserUtil.parse("select a from mytable");
	final EqualsTo equalsTo = new EqualsTo();
	equalsTo.setLeftExpression(new Column("a"));
	equalsTo.setRightExpression(new Column("b"));
	Join addJoin = SelectUtils.addJoin(select, new Table("mytable2"), equalsTo);
	addJoin.setLeft(true);
	assertEquals("SELECT a FROM mytable LEFT JOIN mytable2 ON a = b", select.toString());
}