Get API working and test with unit test