Tests for util.new_context.