protected Timestamp convertIntegerToTimestamp( Long longValue ) {
    if ( longValue == null ) {
      return null;
    }

    Long nanos = longValue;

    if ( Const.KETTLE_TIMESTAMP_NUMBER_CONVERSION_MODE_MILLISECONDS.equalsIgnoreCase( conversionMode ) ) {
      // Convert milliseconds to nanoseconds!
      nanos *= 1000000L;
    }

    long ss = TimeUnit.SECONDS.convert( nanos, TimeUnit.NANOSECONDS );
    long ms = TimeUnit.MILLISECONDS.convert( nanos, TimeUnit.NANOSECONDS );
    long ns = TimeUnit.NANOSECONDS.convert( ss, TimeUnit.SECONDS );
    int leftNs = (int) ( nanos - ns );

    Timestamp timestamp = new Timestamp( ms );
    timestamp.setNanos( leftNs );
    return timestamp;
  }
@Test
  public void testConvertIntegerToTimestamp_Milliseconds() throws KettleValueException {
    System.setProperty( Const.KETTLE_TIMESTAMP_NUMBER_CONVERSION_MODE,
      Const.KETTLE_TIMESTAMP_NUMBER_CONVERSION_MODE_MILLISECONDS );
    ValueMetaTimestamp valueMetaTimestamp = new ValueMetaTimestamp();
    Timestamp result = valueMetaTimestamp.convertIntegerToTimestamp( TIMESTAMP_AS_MILLISECONDS );
    assertEquals( TIMESTAMP_WITH_MILLISECONDS, result );
  }