[#55] refactored tests using invalid? method