fixing empty-api test, adding more functional tests (creating image