Implement sample API and its unittest