pojo exception handling + test cases