(Adds missing fixes from new junit test integration test,  https://rbcommons.com/s/twitter/r/1161/)