public void testTypeDefWithoutNameAndDefaultForTypeAttributes() {
try {
AnnotationConfiguration config = new AnnotationConfiguration();
config.addAnnotatedClass(LocalContactDetails.class);
config.buildSessionFactory();
fail("Did not throw expected exception");
}
catch( AnnotationException ex ) {
assertEquals(
"Either name or defaultForType (or both) attribute should be set in TypeDef having typeClass org.hibernate.test.annotations.entity.PhoneNumberType",