public void testDuplicateMapping() {
String resourceName = "org/hibernate/test/mappingexception/User.hbm.xml";
Configuration cfg = new Configuration();
cfg.addResource( resourceName );
try {
cfg.addResource( resourceName );
fail();
}
catch ( InvalidMappingException inv ) {
assertEquals( inv.getType(), "resource" );
assertEquals( inv.getPath(), resourceName );