### Question:
DetectLastRowMeta extends BaseTransformMeta implements ITransformMeta<DetectLastRow, DetectLastRowData> { public void getFields( IRowMeta row, String name, IRowMeta[] info, TransformMeta nextTransform, IVariables variables, IHopMetadataProvider metadataProvider ) throws HopTransformException { if ( !Utils.isEmpty( resultfieldname ) ) { IValueMeta v = new ValueMetaBoolean( variables.environmentSubstitute( resultfieldname ) ); v.setOrigin( name ); row.addValueMeta( v ); } }  String getResultFieldName(); void setResultFieldName( String resultfieldname ); void loadXml( Node transformNode, IHopMetadataProvider metadataProvider ); Object clone(); void setDefault(); void getFields( IRowMeta row, String name, IRowMeta[] info, TransformMeta nextTransform,
                         IVariables variables, IHopMetadataProvider metadataProvider ); String getXml(); void check( List<ICheckResult> remarks, PipelineMeta pipelineMeta, TransformMeta transformMeta,
                     IRowMeta prev, String[] input, String[] output, IRowMeta info, IVariables variables,
                     IHopMetadataProvider metadataProvider ); DetectLastRow createTransform( TransformMeta transformMeta, DetectLastRowData data, int cnr,
                                        PipelineMeta pipelineMeta, Pipeline pipeline ); DetectLastRowData getTransformData(); PipelineType[] getSupportedPipelineTypes();  }### Answer:
@Test public void testGetFields() throws HopTransformException { DetectLastRowMeta meta = new DetectLastRowMeta(); meta.setDefault(); meta.setResultFieldName( "The Result" ); RowMeta rowMeta = new RowMeta(); meta.getFields( rowMeta, "this transform", null, null, new Variables(), null ); assertEquals( 1, rowMeta.size() ); assertEquals( "The Result", rowMeta.getValueMeta( 0 ).getName() ); assertEquals( IValueMeta.TYPE_BOOLEAN, rowMeta.getValueMeta( 0 ).getType() ); }