Added throws in docblock
Fixed test case for entity validation