Added validations and test cases to Device