update setup/makefile/tests boilerplate
add mock tests for get_totals API's