@Test
public void assertGetValueBySmallint() throws SQLException {

    when(resultSetMetaData.getColumnType(1)).thenReturn(Types.SMALLINT);
    when(resultSet.getShort(1)).thenReturn(Short.MAX_VALUE);
    assertThat((short) QueryResultUtil.getValue(resultSet, 1), is(Short.MAX_VALUE));
}