@@ -0,0 +1,2636 @@
+/**%0A * Copyright (C) 2011 Akiban Technologies Inc.%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License, version 3,%0A * as published by the Free Software Foundation.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see http://www.gnu.org/licenses.%0A */%0A%0Apackage com.akiban.server.service.tree;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Aimport com.akiban.qp.loadableplan.DirectObjectCursor;%0Aimport com.akiban.qp.loadableplan.DirectObjectPlan;%0Aimport com.akiban.qp.operator.ArrayBindings;%0Aimport com.akiban.qp.operator.Bindings;%0Aimport com.akiban.server.service.session.Session;%0Aimport com.akiban.server.test.it.ITBase;%0Aimport com.akiban.sql.server.ServerServiceRequirements;%0A%0Apublic class PersistitCLILoadablePlanIT extends ITBase %7B%0A%0A    @Test%0A    public void invokePersistitOperation() throws Exception %7B%0A        final TreeService treeService = serviceManager().getTreeService();%0A        final ServerServiceRequirements reqs = new ServerServiceRequirements(%0A                null, null, null, null, treeService, null, null, null);%0A        PersistitCLILoadablePlan loadablePlan = new PersistitCLILoadablePlan();%0A        loadablePlan.setServerServiceRequirements(reqs);%0A        DirectObjectPlan plan = loadablePlan.plan();%0A        Session session = serviceManager().getSessionService().createSession();%0A        %0A        DirectObjectCursor cursor = plan.cursor(session);%0A        Bindings bindings = new ArrayBindings(4);%0A        bindings.set(0, %22stat%22);%0A        bindings.set(1, %22count=3%22);%0A        bindings.set(2, %22delay=2%22);%0A        bindings.set(3, %22-a%22);%0A        %0A        int populatedResults = 0;%0A        int emptyResults = 0;%0A        %0A        cursor.open(bindings);%0A        while(true) %7B%0A            List%3C? extends Object%3E columns = cursor.next();%0A            if (columns == null) %7B%0A                break;%0A            %7D%0A            if (columns.isEmpty()) %7B%0A                emptyResults++;%0A            %7D else %7B%0A                assertEquals(1, columns.size());%0A                assertTrue(columns.get(0) instanceof String);%0A                populatedResults++;%0A            %7D%0A        %7D%0A        assertEquals(3, populatedResults);%0A        assertTrue(emptyResults %3E 0 && emptyResults %3C 60);%0A    %7D%0A%7D%0A

Add IT test