100% test coverage for mainapi