Added validation in unittest