EmailServiceImpl extends Authenticator implements EmailService, InitializedService { @Override public Session getSession() { return session; }  @Autowired @Required void setCfg(ConfigurationService cfg); @Override Session getSession(); @Override void init();  }
@Test public void testGetSession() throws MessagingException { System.out.println("getSession"); Session session; EmailService instance = getService(EmailServiceImpl.class); session = instance.getSession(); assertNotNull(" getSession returned null", session); }