### Question:
JobMetaJsonSerializer extends AbstractMetaJsonSerializer<JobMeta> { @Override protected void serializeSteps( JobMeta meta, JsonGenerator json ) throws IOException { json.writeArrayFieldStart( JSON_PROPERTY_STEPS ); int numberOfEntries = meta.nrJobEntries(); for ( int i = 0; i < numberOfEntries; i++ ) { JobEntryCopy jobEntry = meta.getJobEntry( i ); LineageRepository repo = getLineageRepository(); ObjectId jobId = meta.getObjectId() == null ? new StringObjectId( meta.getName() ) : meta.getObjectId(); ObjectId entryId = jobEntry.getObjectId() == null ? new StringObjectId( jobEntry.getName() ) : jobEntry.getObjectId(); JobEntryInterface jobEntryInterface = jobEntry.getEntry(); JobEntryBase jobEntryBase = getJobEntryBase( jobEntryInterface ); Job job = new Job( null, meta ); jobEntryBase.setParentJob( job ); jobEntryInterface.setObjectId( entryId ); try { jobEntryInterface.saveRep( repo, null, jobId ); } catch ( KettleException e ) { LOGGER.warn( Messages.getString( "INFO.Serialization.Trans.Step", jobEntry.getName() ), e ); } json.writeObject( jobEntryBase ); } json.writeEndArray(); } JobMetaJsonSerializer( Class<JobMeta> aClass );  JobMetaJsonSerializer( JavaType javaType );  JobMetaJsonSerializer( Class<?> aClass, boolean b );   }### Answer:
@Test public void testSerializeSteps() throws Exception { when( meta.nrJobEntries() ).thenReturn( 2 ); JobEntryCopy jobEntryCopy = mock( JobEntryCopy.class ); JobEntryInterface jobEntryInterface = new JobEntrySuccess( "name", "description" ); when( meta.getJobEntry( anyInt() ) ).thenReturn( jobEntryCopy ); when( meta.getName() ).thenReturn( "JobMeta" ); when( jobEntryCopy.getName() ).thenReturn( "JobEntry" ); when( jobEntryCopy.getEntry() ).thenReturn( jobEntryInterface ); serializer.serializeSteps( meta, json ); verify( json, times( 2 ) ).writeObject( jobEntryInterface ); }