Refactor tests and add test for missing argument