StatsDatabaseCheck implements IPentahoSystemListener { public boolean startup( final IPentahoSession session ) { JobMeta jobMeta = null; String jobFileFullPath = getJobFileFullPath(); try { jobMeta = new JobMeta( jobFileFullPath, null ); } catch ( KettleXMLException kxe ) { Logger.error( "Error opening " + jobFileFullPath, kxe.getMessage() ); return false; } return executeJob( jobMeta, jobFileFullPath ); }  boolean startup( final IPentahoSession session ); void shutdown(); String getJobFileName(); void setJobFileName( String jobFileName );  }
@Test public void testStartup() throws Exception { StatsDatabaseCheck spyCheck = spy( statsDatabaseCheck ); doReturn( null ).when( spyCheck ).getJobFileFullPath(); boolean startup = spyCheck.startup( session ); assertFalse( startup ); }