Unit Testing of Energy Consumption of Software Libraries