BigDecimal firstValue = (BigDecimal) dq.get("id"); dq.next();  BigDecimal secondValue = (BigDecimal) dq.get("id"); dq.next();
BigDecimal firstValue = (BigDecimal) dq.get("id"); dq.next();
    public void FAILStestCursorMovement() {        // TODO: uncomment This test will fail, since the cursor        // methods are not properly implemented.  The code is        // commented out until we work out whether and how to        // incorporate tests that are _known_ to fail into the build        // system. Currently, this test would break the weekly formal        // build.         DataQuery dq = getDefaultQuery();            // first is unsupported for foward-only resultsets.         assert("first() Failed! There should be rows in this query!",                 dq.first());         assert("Should be on the first row!", dq.isFirst() );         assert("last() Failed! There should be rows in this query!",                 dq.last());         assert("Should be on the last row!", dq.isLast() );         try {            dq.next();            dq.get("id");            fail("Should throw exception if get() called when cursor off " +                 "DataQuery");         }         catch (PersistenceException e) {         }         // Back to the beginning         assert("first() Failed! There should be rows in this query!",                 dq.first());         assert("Should be on the first row!", dq.isFirst() );         BigDecimal firstValue = (BigDecimal) dq.get("id");         dq.next();                  BigDecimal secondValue = (BigDecimal) dq.get("id");         dq.next();         dq.previous();         assert( "previous() did not work first time!",                  secondValue.equals(dq.get("id")) );         dq.previous();         assert( "previous() did not work second time!",                  firstValue.equals(dq.get("id")) );         assert("Should be on the first row!", dq.isFirst() );    }