change tests to  use given rather than when syntax