test(api_formatter): add unit test to cover api_formatter