### Question:
Vertica5DatabaseMeta extends VerticaDatabaseMeta { @Override public Object getValueFromResultSet( ResultSet rs, IValueMeta val, int index ) throws HopDatabaseException { Object data; try { switch ( val.getType() ) { case IValueMeta.TYPE_TIMESTAMP: case IValueMeta.TYPE_DATE: if ( val.getOriginalColumnType() == java.sql.Types.TIMESTAMP ) { data = rs.getTimestamp( index + 1 ); break; } else if ( val.getOriginalColumnType() == java.sql.Types.TIME ) { data = rs.getTime( index + 1 ); break; } else { data = rs.getDate( index + 1 ); break; } default: return super.getValueFromResultSet( rs, val, index ); } if ( rs.wasNull() ) { data = null; } } catch ( SQLException e ) { throw new HopDatabaseException( "Unable to get value '" + val.toStringMeta() + "' from database resultset, index " + index, e ); } return data; }  @Override String getDriverClass(); @Override boolean supportsTimeStampToDateConversion(); @Override Object getValueFromResultSet( ResultSet rs, IValueMeta val, int index );  }### Answer:
@Test public void testVerticaTimeType() throws Exception { ResultSetMetaData metaData = mock( ResultSetMetaData.class ); IValueMeta iValueMeta = mock( ValueMetaInternetAddress.class ); when( resultSet.getMetaData() ).thenReturn( metaData ); when( metaData.getColumnType( 1 ) ).thenReturn( Types.TIME ); when( resultSet.getTime( 1 ) ).thenReturn( new Time( 0 ) ); when( iValueMeta.getOriginalColumnType() ).thenReturn( Types.TIME ); when( iValueMeta.getType() ).thenReturn( IValueMeta.TYPE_DATE ); IDatabase iDatabase = new Vertica5DatabaseMeta(); Object ret = iDatabase.getValueFromResultSet( resultSet, iValueMeta, 0 ); assertEquals( new Time( 0 ), ret ); }