Given when then test to be refactored