### Question:
JobEntryAnalyzer extends BaseKettleMetaverseComponent implements
  IClonableJobEntryAnalyzer<IMetaverseNode, T> { protected void validateState( IComponentDescriptor descriptor, T entry ) throws MetaverseAnalyzerException { if ( entry == null ) { throw new MetaverseAnalyzerException( Messages.getString( "ERROR.JobEntryInterface.IsNull" ) ); } jobEntryInterface = entry; parentJob = entry.getParentJob(); if ( parentJob == null ) { throw new MetaverseAnalyzerException( Messages.getString( "ERROR.ParentJob.IsNull" ) ); } parentJobMeta = parentJob.getJobMeta(); if ( parentJobMeta == null ) { throw new MetaverseAnalyzerException( Messages.getString( "ERROR.ParentJobMeta.IsNull" ) ); } if ( metaverseBuilder == null ) { throw new MetaverseAnalyzerException( Messages.getString( "ERROR.MetaverseBuilder.IsNull" ) ); } if ( metaverseObjectFactory == null ) { throw new MetaverseAnalyzerException( Messages.getString( "ERROR.MetaverseObjectFactory.IsNull" ) ); } }  @Override IMetaverseNode analyze( IComponentDescriptor descriptor, T entry ); IConnectionAnalyzer<Object, T> getConnectionAnalyzer(); void setConnectionAnalyzer( IConnectionAnalyzer<Object, T> connectionAnalyzer ); IComponentDescriptor getDescriptor(); void setDescriptor( IComponentDescriptor descriptor ); @Override final IClonableJobEntryAnalyzer cloneAnalyzer(); @Override void setDocumentAnalyzer( final IClonableDocumentAnalyzer documentAnalyzer ); @Override IClonableDocumentAnalyzer getDocumentAnalyzer(); @Override void setDocumentDescriptor( final IComponentDescriptor documentDescriptor ); @Override void setDocumentPath( final String documentPath ); @Override IComponentDescriptor getDocumentDescriptor();  }### Answer:
@Test( expected = MetaverseAnalyzerException.class ) public void testValidateStateNullEntry() throws MetaverseAnalyzerException { analyzer.validateState( mockDescriptor, null ); }
@Test( expected = MetaverseAnalyzerException.class ) public void testValidateStateNullParentJob() throws MetaverseAnalyzerException { final Job parentJob = null; when( mockJobEntryInterface.getParentJob() ).thenReturn( parentJob ); analyzer.validateState( mockDescriptor, mockJobEntryInterface ); }
@Test( expected = MetaverseAnalyzerException.class ) public void testValidateStateNullParentJobMeta() throws MetaverseAnalyzerException { final JobMeta parentJobMeta = null; when( mockJob.getJobMeta() ).thenReturn( parentJobMeta ); analyzer.validateState( mockDescriptor, mockJobEntryInterface ); }
@Test( expected = MetaverseAnalyzerException.class ) public void testValidateStateNullMetaverseObjectFactory() throws MetaverseAnalyzerException { IMetaverseObjectFactory factory = null; when( mockBuilder.getMetaverseObjectFactory() ).thenReturn( factory ); analyzer.setMetaverseBuilder( mockBuilder ); analyzer.validateState( mockDescriptor, mockJobEntryInterface ); }