### Question:
Query { public static QueryBuilder select() { return new QueryBuilderImpl(); } private  Query(QueryBuilderImpl queryBuilder); FluentCursor perform(SQLiteDatabase db); RawQuery toRawQuery(); QueryBuilder buildUpon(); Set<String> getTables(); static QueryBuilder select(); static CompoundQueryBuilder select(Query query); static CompoundQueryBuilder select(QueryBuilder queryBuilder); static Query union(Query... queries); static Query unionAll(Query... queries); static Query intersect(Query... queries);  }### Answer:
@Test(expected = IllegalStateException.class) public void shouldAllowSettingTheLimitOnlyOnce() throws Exception { select() .from("table_a") .limit(1) .limit(1); }
@Test(expected = IllegalStateException.class) public void shouldNotAllowSettingValidNumericalOffsetAfterNullLimit() throws Exception { select() .from("table_a") .limit(null) .offset(1); }
@Test(expected = IllegalStateException.class) public void shouldNotAllowSettingValidExpressionOffsetAfterNullLimit() throws Exception { select() .from("table_a") .limit(null) .offset("1+1"); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectExpressionInProjectionWithUnboundArgsPlaceholders() throws Exception { select().expr(column("col2").eq().arg()); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectSelectionWithExpressionWithTooManyArgsPlaceholders() throws Exception { select().where(column("col2").eq().arg()); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectSelectionWithExpressionWithTooFewArgsPlaceholders() throws Exception { select().where(column("col2").eq().arg(), 1, 2); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectJoinConstraintWithExpressionWithTooManyArgsPlaceholders() throws Exception { select().from("table_a").join("table_b").on(column("col2").eq().arg()); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectJoinConstraintWithExpressionWithTooFewArgsPlaceholders() throws Exception { select().from("table_a").join("table_b").on(column("col2").eq().arg(), 1, 2); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectHavingClauseWithExpressionWithTooManyArgsPlaceholders() throws Exception { select().from("table_a").groupBy("col_a").having(column("col2").eq().arg()); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectHavingClauseWithExpressionWithTooFewArgsPlaceholders() throws Exception { select().from("table_a").groupBy("col_a").having(column("col2").eq().arg(), 1, 2); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectExpressionInGroupByWithUnboundArgsPlaceholders() throws Exception { select().groupBy(column("col2").eq().arg()); }
@Test(expected = IllegalArgumentException.class) public void shouldRejectExpressionInOrderByWithUnboundArgsPlaceholders() throws Exception { select().orderBy(column("col2").eq().arg()); }