### Question:
StepAnalyzer extends BaseKettleMetaverseComponent implements
  IClonableStepAnalyzer<T>, IFieldLineageMetadataProvider<T> { public Map<String, RowMetaInterface> getInputFields( final TransMeta parentTransMeta, final StepMeta parentStepMeta ) { Map<String, RowMetaInterface> rowMeta = null; if ( parentTransMeta != null ) { try { rowMeta = new HashMap(); ProgressNullMonitorListener progressMonitor = new ProgressNullMonitorListener(); prevStepNames = parentTransMeta.getPrevStepNames( parentStepMeta ); RowMetaInterface rmi = parentTransMeta.getPrevStepFields( parentStepMeta, progressMonitor ); progressMonitor.done(); if ( !ArrayUtils.isEmpty( prevStepNames ) ) { populateInputFieldsRowMeta( rowMeta, rmi ); } } catch ( KettleStepException e ) { rowMeta = null; } } return rowMeta; }  @Override IMetaverseNode analyze( IComponentDescriptor descriptor, T meta ); @Override void postAnalyze( T meta ); Set<String> getInputStepNames( final T meta, final String fieldName ); String getStepName(); StepNodes getInputs(); StepNodes getOutputs(); void setDescriptor( IComponentDescriptor descriptor ); IComponentDescriptor getDescriptor(); Set<StepField> createStepFields( String fieldName, StepNodes stepNodes ); void validateState( IComponentDescriptor descriptor, T object ); IConnectionAnalyzer getConnectionAnalyzer(); void setConnectionAnalyzer( IConnectionAnalyzer connectionAnalyzer ); Map<String, RowMetaInterface> getInputFields( final TransMeta parentTransMeta,
                                                       final StepMeta parentStepMeta ); @Override Map<String, RowMetaInterface> getInputFields( T meta ); @Override RowMetaInterface getOutputFields( T meta ); @Override Set<IFieldMapping> getFieldMappings( T meta ); @Override Set<ComponentDerivationRecord> getChangeRecords( T meta ); void loadInputAndOutputStreamFields( T meta ); @Override final IClonableStepAnalyzer cloneAnalyzer(); IMetaverseNode getNode( final String name, final String type, final INamespace namespace,
                                 final String nodeKey, final Map<String, IMetaverseNode> nodeMap ); @Override void setDocumentAnalyzer( final IClonableDocumentAnalyzer documentAnalyzer ); @Override IClonableDocumentAnalyzer getDocumentAnalyzer(); @Override void setDocumentDescriptor( final IComponentDescriptor documentDescriptor ); @Override IComponentDescriptor getDocumentDescriptor(); @Override void setDocumentPath( final String documentPath ); static final String NONE; }### Answer:
@Test public void testGetInputFieldsWithException() { analyzer = new StepAnalyzer() { @Override public void validateState( IComponentDescriptor descriptor, BaseStepMeta object ) throws MetaverseAnalyzerException { throw new MetaverseAnalyzerException( "expected exception" ); } @Override public Set<Class<? extends BaseStepMeta>> getSupportedSteps() { return null; } @Override protected Set getUsedFields( BaseStepMeta meta ) { return null; } @Override protected void customAnalyze( BaseStepMeta meta, IMetaverseNode rootNode ) throws MetaverseAnalyzerException { } }; assertNull( analyzer.getInputFields( null ) ); }