### Question:
JobLineageHolderMap { public IMetaverseBuilder getMetaverseBuilder( Job job ) { if ( job != null ) { if ( job.getParentJob() == null && job.getParentTrans() == null ) { IMetaverseBuilder builder = this.getLineageHolder( job ).getMetaverseBuilder(); if ( builder == null ) { return getDefaultMetaverseBuilder(); } else { return builder; } } else { if ( job.getParentJob() != null ) { return this.getMetaverseBuilder( job.getParentJob() ); } else { return TransLineageHolderMap.getInstance().getMetaverseBuilder( job.getParentTrans() ); } } } return null; } private  JobLineageHolderMap(); static JobLineageHolderMap getInstance(); LineageHolder getLineageHolder( Job job ); void putLineageHolder( Job job, LineageHolder holder ); LineageHolder removeLineageHolderImpl( final Job job  ); LineageHolder removeLineageHolder( Job job  ); IMetaverseBuilder getMetaverseBuilder( Job job );  }### Answer:
@Test public void testGetMetaverseBuilder() throws Exception { assertNull( jobLineageHolderMap.getMetaverseBuilder( null ) ); Job job = mock( Job.class ); when( job.getParentJob() ).thenReturn( null ); when( job.getParentTrans() ).thenReturn( null ); mockHolder.setMetaverseBuilder( mockBuilder ); jobLineageHolderMap.putLineageHolder( job, mockHolder ); IMetaverseBuilder builder = jobLineageHolderMap.getMetaverseBuilder( job ); assertNotNull( builder ); Job parentJob = mock( Job.class ); when( parentJob.getParentJob() ).thenReturn( null ); when( parentJob.getParentTrans() ).thenReturn( null ); when( job.getParentJob() ).thenReturn( parentJob ); LineageHolder mockParentHolder = spy( new LineageHolder() ); IMetaverseBuilder mockParentBuilder = mock( IMetaverseBuilder.class ); jobLineageHolderMap.putLineageHolder( parentJob, mockParentHolder ); mockParentHolder.setMetaverseBuilder( null ); assertEquals( defaultBuilder, jobLineageHolderMap.getMetaverseBuilder( job ) ); mockParentHolder.setMetaverseBuilder( mockParentBuilder ); builder = jobLineageHolderMap.getMetaverseBuilder( job ); assertNotNull( builder ); }