refactor test structure and update to expect syntax