@Test
public void testGetValueFromResultSet() throws Exception{

    ResultSet resultSet = mock(ResultSet.class);
    when(resultSet.getInt(1)).thenReturn(Integer.MAX_VALUE);
    DBUtils.getValueFromResultSet(1, resultSet, Integer.class);
    verify(resultSet, times(1)).getInt(1);
    when(resultSet.getLong(2)).thenReturn(Long.MAX_VALUE);
    DBUtils.getValueFromResultSet(2, resultSet, Long.class);
    verify(resultSet, times(1)).getLong(2);
    when(resultSet.getShort(3)).thenReturn(Short.MAX_VALUE);
    DBUtils.getValueFromResultSet(3, resultSet, Short.class);
    verify(resultSet, times(1)).getShort(3);
    when(resultSet.getBoolean(4)).thenReturn(Boolean.FALSE);
    DBUtils.getValueFromResultSet(4, resultSet, Boolean.class);
    verify(resultSet, times(1)).getBoolean(4);
    when(resultSet.getFloat(5)).thenReturn(Float.MAX_VALUE);
    DBUtils.getValueFromResultSet(5, resultSet, Float.class);
    verify(resultSet, times(1)).getFloat(5);
    when(resultSet.getDouble(6)).thenReturn(Double.MAX_VALUE);
    DBUtils.getValueFromResultSet(6, resultSet, Double.class);
    verify(resultSet, times(1)).getDouble(6);
    when(resultSet.getString(7)).thenReturn("7 string");
    DBUtils.getValueFromResultSet(7, resultSet, String.class);
    verify(resultSet, times(1)).getString(7);
    when(resultSet.getString(8)).thenReturn("8 CharSequence");
    DBUtils.getValueFromResultSet(8, resultSet, CharSequence.class);
    verify(resultSet, times(1)).getString(8);
    when(resultSet.getBigDecimal(9)).thenReturn(new BigDecimal("1"));
    DBUtils.getValueFromResultSet(9, resultSet, BigDecimal.class);
    verify(resultSet, times(1)).getBigDecimal(9);
    final long now = System.currentTimeMillis();
    when(resultSet.getLong(10)).thenReturn(now);
    DBUtils.getValueFromResultSet(10, resultSet, java.util.Date.class);
    verify(resultSet, times(1)).getLong(10);
    when(resultSet.getLong(11)).thenReturn(now);
    DBUtils.getValueFromResultSet(11, resultSet, java.sql.Date.class);
    verify(resultSet, times(1)).getLong(11);
    when(resultSet.getLong(12)).thenReturn(now);
    DBUtils.getValueFromResultSet(12, resultSet, Time.class);
    verify(resultSet, times(1)).getLong(12);
    when(resultSet.getLong(13)).thenReturn(now);
    DBUtils.getValueFromResultSet(13, resultSet, Timestamp.class);
    verify(resultSet, times(1)).getLong(13);
    when(resultSet.getBytes(14)).thenReturn("bytes".getBytes());
    DBUtils.getValueFromResultSet(14, resultSet, byte[].class);
    verify(resultSet, times(1)).getBytes(14);
}