added support for private constructor entities and exceptions for entities that have private constructor and mandatory arguments, tests included for that changes