### Question:
AbstractStepMetaJsonSerializer extends GenericStepOrJobEntryJsonSerializer<T> { protected void writeFieldTransforms( T meta, JsonGenerator json, SerializerProvider serializerProvider ) throws IOException, JsonGenerationException { json.writeArrayFieldStart( JSON_PROPERTY_TRANSFORMS ); IFieldLineageMetadataProvider mapper = getFieldLineageMetadataProvider( meta ); try { Set<ComponentDerivationRecord> changes = mapper.getChangeRecords( meta ); if ( changes != null ) { for ( ComponentDerivationRecord change : changes ) { if ( change.hasDelta() ) { json.writeObject( change ); } } } } catch ( MetaverseAnalyzerException e ) { LOGGER.warn( Messages.getString( "WARNING.Serialization.Step.WriteFieldTransforms", meta.getParentStepMeta().getName() ), e ); } json.writeEndArray(); } protected  AbstractStepMetaJsonSerializer( Class<T> aClass ); protected  AbstractStepMetaJsonSerializer( Class<T> aClass, LineageRepository repo ); IStepAnalyzerProvider getStepAnalyzerProvider(); void setStepAnalyzerProvider( IStepAnalyzerProvider stepAnalyzerProvider ); static final String JSON_PROPERTY_TRANSFORMS; static final String JSON_PROPERTY_INPUT_FIELDS; static final String JSON_PROPERTY_OUTPUT_FIELDS; static final String JSON_PROPERTY_MAPPINGS; }### Answer:
@Test public void testWriteFieldTransforms() throws Exception { Set<ComponentDerivationRecord> changeRecords = new HashSet<ComponentDerivationRecord>(); ComponentDerivationRecord change1 = mock( ComponentDerivationRecord.class ); ComponentDerivationRecord change2 = mock( ComponentDerivationRecord.class ); when( change1.hasDelta() ).thenReturn( true ); when( change2.hasDelta() ).thenReturn( false ); changeRecords.add( change1 ); changeRecords.add( change2 ); IFieldLineageMetadataProvider mapper = mock( IFieldLineageMetadataProvider.class ); AbstractStepMetaJsonSerializer spy = spy( serializer ); when( spy.getFieldLineageMetadataProvider( spyMeta ) ).thenReturn( mapper ); when( mapper.getChangeRecords( spyMeta ) ).thenReturn( changeRecords ); spy.writeFieldTransforms( spyMeta, json, provider ); verify( json ).writeObject( change1 ); verify( json, never() ).writeObject( change2 ); }