Remove unnecesary exception throwing.
Add test to GenerateMojo