### Question:
StepAnalyzer extends BaseKettleMetaverseComponent implements
  IClonableStepAnalyzer<T>, IFieldLineageMetadataProvider<T> { protected Set<ComponentDerivationRecord> getChanges() { Set<ComponentDerivationRecord> changes = new HashSet<>(); try { Set<ComponentDerivationRecord> changeRecords = getChangeRecords( baseStepMeta ); if ( CollectionUtils.isNotEmpty( changeRecords ) ) { changes.addAll( changeRecords ); } } catch ( MetaverseAnalyzerException e ) { LOGGER.warn( "Error getting change records", e ); } Set<ComponentDerivationRecord> passthroughChanges = getPassthroughChanges(); if ( CollectionUtils.isNotEmpty( passthroughChanges ) ) { changes.addAll( passthroughChanges ); } return changes; }  @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 testGetChanges() throws Exception { ComponentDerivationRecord change1 = mock( ComponentDerivationRecord.class ); ComponentDerivationRecord change2 = mock( ComponentDerivationRecord.class ); ComponentDerivationRecord change3 = mock( ComponentDerivationRecord.class ); Set<ComponentDerivationRecord> changeRecords = new HashSet<>(); changeRecords.add( change1 ); changeRecords.add( change2 ); changeRecords.add( change3 ); ComponentDerivationRecord passthrough1 = mock( ComponentDerivationRecord.class ); ComponentDerivationRecord passthrough2 = mock( ComponentDerivationRecord.class ); Set<ComponentDerivationRecord> passthroughs = new HashSet<>(); passthroughs.add( passthrough1 ); passthroughs.add( passthrough2 ); doReturn( changeRecords ).when( analyzer ).getChangeRecords( baseStepMeta ); doReturn( passthroughs ).when( analyzer ).getPassthroughChanges(); Set<ComponentDerivationRecord> changes = analyzer.getChanges(); assertTrue( CollectionUtils.isNotEmpty( changes ) ); assertEquals( 5, changes.size() ); }