Fix tests to be ordering agnostic to guard against jdk issues