### Question:
SelectValuesStepAnalyzer extends StepAnalyzer<SelectValuesMeta> { @Override protected boolean isPassthrough( StepField originalFieldName ) { if ( ArrayUtils.isEmpty( baseStepMeta.getSelectName() ) ) { SelectMetadataChange[] changes = baseStepMeta.getMeta(); boolean isOnMetaTab = false; for ( int i = 0; i < changes.length; i++ ) { SelectMetadataChange change = changes[ i ]; if ( originalFieldName.getFieldName().equalsIgnoreCase( change.getName() ) ) { isOnMetaTab = true; break; } } final List<String> fieldDeletesLowerCase = baseStepMeta.getDeleteName() == null ? new ArrayList<>() : Arrays .asList( baseStepMeta.getDeleteName() ).stream().map( String::toLowerCase ).collect( Collectors.toList() ); boolean isDeleted = fieldDeletesLowerCase.contains( originalFieldName.getFieldName().toLowerCase() ); return ( !( isOnMetaTab || isDeleted ) ); } return false; }  @Override Set<ComponentDerivationRecord> getChangeRecords( SelectValuesMeta selectValuesMeta ); @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps();  }### Answer:
@Test public void testIsPassthrough() throws Exception { String[] deleted = new String[] { "FIRST, last" }; String[] selected = new String[] { "AGE" }; SelectMetadataChange[] changed = new SelectMetadataChange[] { testChange1, testChange2 }; when( selectValuesMeta.getDeleteName() ).thenReturn( deleted ); when( selectValuesMeta.getSelectName() ).thenReturn( selected ); when( selectValuesMeta.getMeta() ).thenReturn( changed ); StepField stepField = new StepField( "previousStep", "first" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "last" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "age" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "birthday" ); assertFalse( analyzer.isPassthrough( stepField ) ); }
@Test public void testIsPassthrough_onlyDelete() throws Exception { String[] deleted = new String[] { "first", "LAST" }; String[] selected = new String[0]; SelectMetadataChange[] changed = new SelectMetadataChange[0]; when( selectValuesMeta.getDeleteName() ).thenReturn( deleted ); when( selectValuesMeta.getSelectName() ).thenReturn( selected ); when( selectValuesMeta.getMeta() ).thenReturn( changed ); StepField stepField = new StepField( "previousStep", "first" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "last" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "age" ); assertTrue( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "birthday" ); assertTrue( analyzer.isPassthrough( stepField ) ); }
@Test public void testIsPassthrough_deleteAndMeta() throws Exception { String[] deleted = new String[] { "FIRST", "age" }; String[] selected = new String[0]; SelectMetadataChange[] changed = new SelectMetadataChange[] { testChange1, testChange2 }; when( selectValuesMeta.getDeleteName() ).thenReturn( deleted ); when( selectValuesMeta.getSelectName() ).thenReturn( selected ); when( selectValuesMeta.getMeta() ).thenReturn( changed ); StepField stepField = new StepField( "previousStep", "first" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "last" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "age" ); assertFalse( analyzer.isPassthrough( stepField ) ); stepField.setFieldName( "birthday" ); assertTrue( analyzer.isPassthrough( stepField ) ); }