List of usage examples for org.springframework.beans.factory BeanInitializationException getCause
public synchronized Throwable getCause()
From source file:com.brienwheeler.lib.spring.beans.PropertyPlaceholderConfigurerTest.java
@Test public void testIOException() { try {//from ww w . ja v a 2 s. c om PropertyPlaceholderConfigurer.processLocation( "classpath:com/brienwheeler/lib/spring/beans/PropertyPlaceholderConfigurer-test-not-existent.properties"); Assert.fail(); } catch (BeanInitializationException e) { Assert.assertNotNull(e.getCause()); Assert.assertEquals(FileNotFoundException.class, e.getCause().getClass()); } }