### Question:
SftpPut extends BaseTransform implements ITransform { @VisibleForTesting void checkDestinationFolderField( String realDestinationFoldernameFieldName, SFTPPutData data ) throws HopTransformException { realDestinationFoldernameFieldName = environmentSubstitute( realDestinationFoldernameFieldName ); if ( Utils.isEmpty( realDestinationFoldernameFieldName ) ) { throw new HopTransformException( BaseMessages.getString( PKG, "SFTPPut.Log.DestinatFolderNameFieldNameMissing" ) ); } data.indexOfMoveToFolderFieldName = getInputRowMeta().indexOfValue( realDestinationFoldernameFieldName ); if ( data.indexOfMoveToFolderFieldName == -1 ) { throw new HopTransformException( BaseMessages.getString( PKG, "SFTPPut.Error.CanNotFindField", realDestinationFoldernameFieldName ) ); } } SftpPut(TransformMeta transformMeta, ITransformData data, int copyNr, PipelineMeta pipelineMeta,
                 Pipeline pipeline ); boolean processRow(); void dispose();  }### Answer:
@Test( expected = HopTransformException.class ) public void checkDestinationFolderField_NameIsSet_NotFound() throws Exception { transform.setInputRowMeta( new RowMeta() ); transform.checkDestinationFolderField( "destinationFolder", new SFTPPutData() ); }
@Test public void checkDestinationFolderField_NameIsSet_Found() throws Exception { RowMeta rowMeta = rowOfStringsMeta( "some field", "destinationFolderFieldName" ); transform.setInputRowMeta( rowMeta ); SFTPPutData data = new SFTPPutData(); transform.checkDestinationFolderField( "destinationFolderFieldName", data ); assertEquals( 1, data.indexOfMoveToFolderFieldName ); }
@Test( expected = HopTransformException.class ) public void checkDestinationFolderField_NameIsBlank() throws Exception { SFTPPutData data = new SFTPPutData(); transform.checkDestinationFolderField( "", data ); }