### Question:
SftpPut extends BaseTransform implements ITransform { @VisibleForTesting void checkRemoteFoldernameField( String remoteFoldernameFieldName, SFTPPutData data ) throws HopTransformException { remoteFoldernameFieldName = environmentSubstitute( remoteFoldernameFieldName ); if ( Utils.isEmpty( remoteFoldernameFieldName ) ) { throw new HopTransformException( BaseMessages.getString( PKG, "SFTPPut.Error.RemoteFolderNameFieldMissing" ) ); } data.indexOfRemoteDirectory = getInputRowMeta().indexOfValue( remoteFoldernameFieldName ); if ( data.indexOfRemoteDirectory == -1 ) { throw new HopTransformException( BaseMessages.getString( PKG, "SFTPPut.Error.CanNotFindField", remoteFoldernameFieldName ) ); } } SftpPut(TransformMeta transformMeta, ITransformData data, int copyNr, PipelineMeta pipelineMeta,
                 Pipeline pipeline ); boolean processRow(); void dispose();  }### Answer:
@Test( expected = HopTransformException.class ) public void checkRemoteFoldernameField_NameIsBlank() throws Exception { SFTPPutData data = new SFTPPutData(); transform.checkRemoteFoldernameField( "", data ); }
@Test( expected = HopTransformException.class ) public void checkRemoteFoldernameField_NameIsSet_NotFound() throws Exception { transform.setInputRowMeta( new RowMeta() ); transform.checkRemoteFoldernameField( "remoteFolder", new SFTPPutData() ); }
@Test public void checkRemoteFoldernameField_NameIsSet_Found() throws Exception { RowMeta rowMeta = rowOfStringsMeta( "some field", "remoteFoldernameFieldName" ); transform.setInputRowMeta( rowMeta ); SFTPPutData data = new SFTPPutData(); transform.checkRemoteFoldernameField( "remoteFoldernameFieldName", data ); assertEquals( 1, data.indexOfRemoteDirectory ); }