Added unit test for computeAverages and bugfix

Unit tests revealed a bug into computeAverages: average response time
was incorrect. It is now fixed.