Improve test and add travis

The test timed out on my computer. This makes it work, not only on my computer, but also on **Travis**.