// Path: src/main/java/org/apache/commons/dbutils/ResultSetHandler.java
// public interface ResultSetHandler<T> {
// 
//     /**
//      * Turn the {@code ResultSet} into an Object.
//      *
//      * @param rs The {@code ResultSet} to handle.  It has not been touched
//      * before being passed to this method.
//      *
//      * @return An Object initialized with {@code ResultSet} data. It is
//      * legal for implementations to return {@code null} if the
//      * {@code ResultSet} contained 0 rows.
//      *
//      * @throws SQLException if a database access error occurs
//      */
//     T handle(ResultSet rs) throws SQLException;
// 
// }
// 
// Path: src/test/java/org/apache/commons/dbutils/TestBean.java
// public class TestBean {
// 
//     public enum Ordinal {
// 
//         THREE, SIX;
// 
//     }
// 
//     private String one = null;
// 
//     private String two = null;
// 
//     private Ordinal three = null;
// 
//     private int intTest = 0;
// 
//     private Integer integerTest = Integer.valueOf(0);
// 
//     // UNUSED private Timestamp timestamp = null;
// 
//     private String doNotSet = "not set";
// 
//     /**
//      * toBean() should set primitive fields to their defaults (ie. 0) when
//      * null is returned from the ResultSet.
//      */
//     private int nullPrimitiveTest = 7;
// 
//     /**
//      * toBean() should set Object fields to null when null is returned from the
//      * ResultSet
//      */
//     private Object nullObjectTest = "overwrite";
// 
//     /**
//      * A Date will be returned from the ResultSet but the property is a String.
//      * BeanProcessor should create a String from the Date and set this property.
//      */
//     private String notDate = "not a date";
// 
//     /**
//      * The ResultSet will have a BigDecimal in this column and the
//      * BasicColumnProcessor should convert that to a double and store the value
//      * in this property.
//      */
//     private double columnProcessorDoubleTest = -1;
// 
//     /**
//      * Constructor for TestBean.
//      */
//     public TestBean() {
//     }
// 
//     public String getOne() {
//         return one;
//     }
// 
//     public Ordinal getThree() {
//         return three;
//     }
// 
//     public String getTwo() {
//         return two;
//     }
// 
//     public void setOne(final String string) {
//         one = string;
//     }
// 
//     public void setThree(final Ordinal ordinal) {
//         three = ordinal;
//     }
// 
//     public void setTwo(final String string) {
//         two = string;
//     }
// 
//     public String getDoNotSet() {
//         return doNotSet;
//     }
// 
//     public void setDoNotSet(final String string) {
//         doNotSet = string;
//     }
// 
//     public Integer getIntegerTest() {
//         return integerTest;
//     }
// 
//     public int getIntTest() {
//         return intTest;
//     }
// 
//     public void setIntegerTest(final Integer integer) {
//         integerTest = integer;
//     }
// 
//     public void setIntTest(final int i) {
//         intTest = i;
//     }
// 
//     public Object getNullObjectTest() {
//         return nullObjectTest;
//     }
// 
//     public int getNullPrimitiveTest() {
//         return nullPrimitiveTest;
//     }
// 
//     public void setNullObjectTest(final Object object) {
//         nullObjectTest = object;
//     }
// 
//     public void setNullPrimitiveTest(final int i) {
//         nullPrimitiveTest = i;
//     }
// 
//     public String getNotDate() {
//         return notDate;
//     }
// 
//     public void setNotDate(final String string) {
//         notDate = string;
//     }
// 
//     public double getColumnProcessorDoubleTest() {
//         return columnProcessorDoubleTest;
//     }
// 
//     public void setColumnProcessorDoubleTest(final double d) {
//         columnProcessorDoubleTest = d;
//     }
// 
// }


import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.dbutils.BaseTestCase;
import org.apache.commons.dbutils.ResultSetHandler;
import org.apache.commons.dbutils.TestBean;
        row = iter.next();
        assertEquals("1", row.getOne());
        assertEquals("2", row.getTwo());
        assertEquals(TestBean.Ordinal.THREE, row.getThree());
        assertEquals("not set", row.getDoNotSet());

        assertTrue(iter.hasNext());
        row = iter.next();

        assertEquals("4", row.getOne());
        assertEquals("5", row.getTwo());
        assertEquals(TestBean.Ordinal.SIX, row.getThree());
        assertEquals("not set", row.getDoNotSet());

        assertFalse(iter.hasNext());
    }

    public void testEmptyResultSetHandle() throws SQLException {
        final ResultSetHandler<List<TestBean>> h = new BeanListHandler<>(TestBean.class);
        final List<TestBean> results = h.handle(this.emptyResultSet);

        assertNotNull(results);
        assertTrue(results.isEmpty());
    }

    public void testHandleToSuperClass() throws SQLException {
        final ResultSetHandler<List<TestBean>> h = new BeanListHandler<TestBean>(SubTestBean.class);
        final List<TestBean> results = h.handle(this.rs);

        assertNotNull(results);
// Path: src/main/java/org/apache/commons/dbutils/ResultSetHandler.java
// public interface ResultSetHandler<T> {
// 
//     /**
//      * Turn the {@code ResultSet} into an Object.
//      *
//      * @param rs The {@code ResultSet} to handle.  It has not been touched
//      * before being passed to this method.
//      *
//      * @return An Object initialized with {@code ResultSet} data. It is
//      * legal for implementations to return {@code null} if the
//      * {@code ResultSet} contained 0 rows.
//      *
//      * @throws SQLException if a database access error occurs
//      */
//     T handle(ResultSet rs) throws SQLException;
// 
// }
// 
// Path: src/test/java/org/apache/commons/dbutils/TestBean.java
// public class TestBean {
// 
//     public enum Ordinal {
// 
//         THREE, SIX;
// 
//     }
// 
//     private String one = null;
// 
//     private String two = null;
// 
//     private Ordinal three = null;
// 
//     private int intTest = 0;
// 
//     private Integer integerTest = Integer.valueOf(0);
// 
//     // UNUSED private Timestamp timestamp = null;
// 
//     private String doNotSet = "not set";
// 
//     /**
//      * toBean() should set primitive fields to their defaults (ie. 0) when
//      * null is returned from the ResultSet.
//      */
//     private int nullPrimitiveTest = 7;
// 
//     /**
//      * toBean() should set Object fields to null when null is returned from the
//      * ResultSet
//      */
//     private Object nullObjectTest = "overwrite";
// 
//     /**
//      * A Date will be returned from the ResultSet but the property is a String.
//      * BeanProcessor should create a String from the Date and set this property.
//      */
//     private String notDate = "not a date";
// 
//     /**
//      * The ResultSet will have a BigDecimal in this column and the
//      * BasicColumnProcessor should convert that to a double and store the value
//      * in this property.
//      */
//     private double columnProcessorDoubleTest = -1;
// 
//     /**
//      * Constructor for TestBean.
//      */
//     public TestBean() {
//     }
// 
//     public String getOne() {
//         return one;
//     }
// 
//     public Ordinal getThree() {
//         return three;
//     }
// 
//     public String getTwo() {
//         return two;
//     }
// 
//     public void setOne(final String string) {
//         one = string;
//     }
// 
//     public void setThree(final Ordinal ordinal) {
//         three = ordinal;
//     }
// 
//     public void setTwo(final String string) {
//         two = string;
//     }
// 
//     public String getDoNotSet() {
//         return doNotSet;
//     }
// 
//     public void setDoNotSet(final String string) {
//         doNotSet = string;
//     }
// 
//     public Integer getIntegerTest() {
//         return integerTest;
//     }
// 
//     public int getIntTest() {
//         return intTest;
//     }
// 
//     public void setIntegerTest(final Integer integer) {
//         integerTest = integer;
//     }
// 
//     public void setIntTest(final int i) {
//         intTest = i;
//     }
// 
//     public Object getNullObjectTest() {
//         return nullObjectTest;
//     }
// 
//     public int getNullPrimitiveTest() {
//         return nullPrimitiveTest;
//     }
// 
//     public void setNullObjectTest(final Object object) {
//         nullObjectTest = object;
//     }
// 
//     public void setNullPrimitiveTest(final int i) {
//         nullPrimitiveTest = i;
//     }
// 
//     public String getNotDate() {
//         return notDate;
//     }
// 
//     public void setNotDate(final String string) {
//         notDate = string;
//     }
// 
//     public double getColumnProcessorDoubleTest() {
//         return columnProcessorDoubleTest;
//     }
// 
//     public void setColumnProcessorDoubleTest(final double d) {
//         columnProcessorDoubleTest = d;
//     }
// 
// }


// Path: src/test/java/org/apache/commons/dbutils/handlers/BeanListHandlerTest.java
import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.dbutils.BaseTestCase;
import org.apache.commons.dbutils.ResultSetHandler;
import org.apache.commons.dbutils.TestBean;

        row = iter.next();
        assertEquals("1", row.getOne());
        assertEquals("2", row.getTwo());
        assertEquals(TestBean.Ordinal.THREE, row.getThree());
        assertEquals("not set", row.getDoNotSet());

        assertTrue(iter.hasNext());
        row = iter.next();

        assertEquals("4", row.getOne());
        assertEquals("5", row.getTwo());
        assertEquals(TestBean.Ordinal.SIX, row.getThree());
        assertEquals("not set", row.getDoNotSet());

        assertFalse(iter.hasNext());
    }

    public void testEmptyResultSetHandle() throws SQLException {
        final ResultSetHandler<List<TestBean>> h = new BeanListHandler<>(TestBean.class);
        final List<TestBean> results = h.handle(this.emptyResultSet);

        assertNotNull(results);
        assertTrue(results.isEmpty());
    }

    public void testHandleToSuperClass() throws SQLException {
        final ResultSetHandler<List<TestBean>> h = new BeanListHandler<TestBean>(SubTestBean.class);
        final List<TestBean> results = h.handle(this.rs);

        assertNotNull(results);
        assertEquals(ROWS, results.size());