@Test public void helper_shouldPrintCapabilityEthVersion_whenInfoEnabled() { SystemProperties system = new SystemProperties(); Initializer initializer = new Initializer(); ListAppender<ILoggingEvent> inMemoryAppender = new ListAppender<>(); inMemoryAppender.start(); Logger logger = (Logger) LoggerFactory.getLogger("general"); try { logger.setLevel(Level.DEBUG); logger.addAppender(inMemoryAppender); initializer.postProcessBeforeInitialization(system, "initializerBean"); assertContainsLogLine(inMemoryAppender.list, "capability eth version: [62, 63]"); assertContainsLogLine(inMemoryAppender.list, "capability shh version: [3]"); assertContainsLogLine(inMemoryAppender.list, "capability bzz version: [0]"); } finally { inMemoryAppender.stop(); logger.detachAppender(inMemoryAppender); } }
@Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof SystemProperties) { initConfig((SystemProperties) bean); } return bean; }
Initializer implements BeanPostProcessor { @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof SystemProperties) { initConfig((SystemProperties) bean); } return bean; } }
Initializer implements BeanPostProcessor { @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof SystemProperties) { initConfig((SystemProperties) bean); } return bean; }  }
Initializer implements BeanPostProcessor { @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof SystemProperties) { initConfig((SystemProperties) bean); } return bean; }  @Override Object postProcessBeforeInitialization(Object bean, String beanName); @Override Object postProcessAfterInitialization(Object bean, String beanName); }
Initializer implements BeanPostProcessor { @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof SystemProperties) { initConfig((SystemProperties) bean); } return bean; }  @Override Object postProcessBeforeInitialization(Object bean, String beanName); @Override Object postProcessAfterInitialization(Object bean, String beanName);  }