// Test 1; OK
r := repository.NewMockRepository()
r.On("FetchData", mock.Anything, 1).
Return(&model.Data{}, nil)
h := NewHandler(r, nil)
_, err := h.HandleRequest()(writer, request)
assert.Equal(t, nil, err)
// Test 2; error occured in repository
r := repository.NewMockRepository() // ←----------- ここ!!! ---------
testErr := errors.New("test error")
r.On("FetchData", mock.Anything, 1).
Return(&model.Data{}, testErr)
h = NewHandler(r, nil)
_, err := h.HandleRequest()(writer, request)
assert.Equal(t, testErr, err)