### Question:
BooleanType implements ExtendedType<Boolean> { @Override public Boolean materializeObject(ResultSet rs, int index, int type) throws Exception { boolean b = rs.getBoolean(index); return (rs.wasNull()) ? null : b ? Boolean.TRUE : Boolean.FALSE; }  @Override String getClassName(); @Override void setJdbcObject(
            PreparedStatement st,
            Boolean val,
            int pos,
            int type,
            int precision); @Override Boolean materializeObject(ResultSet rs, int index, int type); @Override Boolean materializeObject(CallableStatement st, int index, int type); @Override String toString(Boolean value);  }### Answer:
@Test public void testMaterializeObjectFromResultSet() throws Exception { MockResultSet rs = new MockResultSet("") { @Override public boolean getBoolean(int i) throws SQLException { return (i + 2) % 2 == 0; } }; BooleanType type = new BooleanType(); assertSame(Boolean.FALSE, type.materializeObject(rs, 1, Types.BIT)); assertSame(Boolean.TRUE, type.materializeObject(rs, 2, Types.BIT)); }