@@ -0,0 +1,921 @@
+package org.ccci.gto.android.common.db;%0A%0Aimport android.support.test.runner.AndroidJUnit4;%0Aimport android.test.InstrumentationTestCase;%0Aimport android.util.Pair;%0A%0Aimport org.ccci.gto.android.common.db.TestDao.TestContract.RootTable;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class QueryTest extends InstrumentationTestCase %7B%0A    private TestDao getDao() %7B%0A        return new TestDao(getInstrumentation().getContext());%0A    %7D%0A%0A    @Test%0A    public void testHavingSql() %7B%0A        Expression having = RootTable.FIELD_TEST.count().eq(1);%0A        Query query = Query.select(RootTable.class).groupBy(RootTable.COLUMN_TEST).having(having);%0A        Pair%3CString, String%5B%5D%3E sqlPair = query.buildSqlHaving(getDao());%0A        assertThat(sqlPair.first, is(%22(COUNT (root.test) == 1)%22));%0A    %7D%0A%7D%0A

Add test for query