Might it be tidier to have a variable `mockLayer`? The an identical object is returned for each function call so we could just initialise it once and reuse it.