Actions done:
- Change exception to MappingException
- Change test to use setExpectedException instead of @expectedException
- Update phpdoc of loadMetadata and fix CS