Add some exception
Update and add unit test
Add constants clas
Update mapping file