Working on unit test for endpoint