CountryDetectorServiceTester serviceTester = new CountryDetectorServiceTester(getContext());
CountryListenerTester listenerTesterA = new CountryListenerTester();
CountryListenerTester listenerTesterB = new CountryListenerTester();
Country country = new Country("US", Country.COUNTRY_SOURCE_NETWORK);
serviceTester.systemRunning();
waitForSystemReady(serviceTester);
serviceTester.addCountryListener(listenerTesterA);
serviceTester.addCountryListener(listenerTesterB);
serviceTester.notifyReceivers(country);
assertTrue(serviceTester.isListenerSet());
assertTrue(listenerTesterA.isNotified());
assertTrue(listenerTesterB.isNotified());
serviceTester.removeCountryListener(listenerTesterA);
serviceTester.removeCountryListener(listenerTesterB);
assertFalse(serviceTester.isListenerSet());