Constructor Detail

TestUtil

public TestUtil()

Method Detail

clearAllStaticFieldsForUnitTest

public static void clearAllStaticFieldsForUnitTest()

THIS IS FOR UNIT TESTS ONLY - DO NOT CALL THIS METHOD FROM USER CODE

When we run the unit tests in cobertura, JUnit doesn't seem to clean up static fields which leads to
tons of memory being used by the end and the JVM crashes in Travis. Manually clearing all of the
static fields seems to solve this.

randomizeLocale

public static void randomizeLocale()

Set some system properties randomly after each test.. this is kind of hackish,
but it helps us make sure we don't have any tests that depend on a particular
environment