public function testAddAndPopRegisteredUtilities()
{
AdsUtilityRegistry::getInstance()->addUtility('BatchJobHelper');
AdsUtilityRegistry::getInstance()->addUtility('ReportDownloader/file');
AdsUtilityRegistry::getInstance()->addUtility('ReportDownloader/string');
$expected = array('BatchJobHelper' => 'BatchJobHelper', 'ReportDownloader/file' => 'ReportDownloader/file', 'ReportDownloader/string' => 'ReportDownloader/string');
// First time, get all registered ads utilities.
$this->assertEquals($expected, AdsUtilityRegistry::getInstance()->popAllUtilities());
// Second time and later, get an empty list.
$this->assertEquals(array(), AdsUtilityRegistry::getInstance()->popAllUtilities());
$this->assertEquals(array(), AdsUtilityRegistry::getInstance()->popAllUtilities());
}