Some tests fail when run with a non-English locale. This was found by debbiedub (see https://github.com/Bombe/Sone/pull/23) but their proposed solution was not quite to my liking.
This TestRule will store the JVM’s current default locale and set a custom locale before running a test. After the test the previous locale will be restored, in order not to mess up any other tests.