Refactor test and start work on test for Twitter