@Test
public void fromQuery() {

    QueryBuilder sel = Squel.select().from("students").where("a = ?", 2);
    QueryBuilder sql = Squel.insert()
            .into("table")
            .fromQuery(Arrays.asList("field1", "field2"), sel);
    String actual = sql.toString();
    String expected = "INSERT INTO table (field1, field2) (SELECT * FROM students WHERE (a = 2))";
    assertEquals(expected, actual);
}