title: How to test afterPropertiesSet method in my spring application?
body: <p>I am working on writing some junit test for my spring application. Below is my application which implements InitializingBean interface,</p>
  
  <pre><code>public class InitializeFramework implements InitializingBean {
  
  
      @Override
      public void afterPropertiesSet() throws Exception {
  
          try {
  
          } catch (Exception e) {
  
          }
      }
  }
  </code></pre>
  
  <p>Now I want to call <code>afterPropertiesSet</code> method from my junit test but somehow, I am not able to understand what is the right way to do this? I thought, I can use reflection to call this method but I don't think, it's a right way to do that?</p>
  
  <p>Can anyone provide me a simple example for this on how to write a simple junit test that will test <code>afterPropertiesSet</code> method in <code>InitializeFramework</code> class?</p>