pulled out logic to build map of current api calls and put it under test