@@ -0,0 +1,857 @@
+package com.nflabs.zeppelin.zql;%0A%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0A%0Aimport com.nflabs.zeppelin.conf.ZeppelinConfiguration;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class ZTest extends TestCase %7B%0A%0A%09protected void setUp() throws Exception %7B%0A%09%09super.setUp();%0A%09%7D%0A%0A%09protected void tearDown() throws Exception %7B%0A%09%09super.tearDown();%0A%09%7D%0A%0A%09%0A%09public void testPipeGetQuery()%7B%0A%09%09assertEquals(%22create view vv as select * from (select * from bank) q limit 10%22, new Q(%22select * from bank%22)%0A%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09  .pipe(new Q(%22select * from ($%7Bq%7D) q limit 10%22))%0A%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09  .pipe(new Q(%22create view vv as%22))%0A%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09  .getQuery()%0A%09%09);%0A%09%7D%0A%09%0A%09public void testShowTables() throws ClassNotFoundException, SQLException%7B%0A%09%09ZeppelinConfiguration conf = new ZeppelinConfiguration();%0A%09%09Z.init(conf);%0A%09%09%0A%09%09new Q(%22show tables%22).execute();%0A%09%09%0A%09%7D%0A%7D%0A

Test for ZQL