@Test
public void assertGetValueByInteger() throws SQLException {

    when(resultSetMetaData.getColumnType(1)).thenReturn(Types.INTEGER);
    when(resultSet.getInt(1)).thenReturn(Integer.MAX_VALUE);
    assertThat((int) QueryResultUtil.getValue(resultSet, 1), is(Integer.MAX_VALUE));
}