TemplatingManager implements IDmListener { void generate( Application application ) { Collection<TemplateEntry> templates = Collections.emptyList(); synchronized( this.watcherLock ) { if( this.templateWatcher != null ) templates = this.templateWatcher.findTemplatesForApplication( application.getName()); } generate( application, templates ); }  void setPollInterval( long pollInterval ); void setTemplatesDirectory( String templatesDirectory ); void setOutputDirectory( String outputDirectory ); void bindManager( Manager dm ); void unbindManager( Manager dm ); void start(); void stop(); @Override String getId(); @Override void application( Application application, EventType eventType ); @Override void applicationTemplate( ApplicationTemplate tpl, EventType eventType ); @Override void instance( Instance instance, Application application, EventType eventType ); @Override void raw( String message, Object... data ); @Override void enableNotifications(); @Override void disableNotifications(); void processNewTemplates( Collection<TemplateEntry> newTemplates ); static final String ID; }
@Test public void testLoggingInGenerate_npe() throws Exception { TemplatingManager mngr = new TemplatingManager(); Application app = new Application( "test", null ); Collection<TemplateEntry> te = new ArrayList<> (); te.add( null ); mngr.generate( app, te ); }