public void testNotifyFailedWhenNotStarted() {
   AbstractService service = new DefaultService();
   try {
     service.notifyFailed(new Exception());
     fail();
   } catch (IllegalStateException expected) {
   }
 }
 public void testNotifyStoppedWhenNotRunning() {
   AbstractService service = new DefaultService();
   try {
     service.notifyStopped();
     fail();
   } catch (IllegalStateException expected) {
   }
 }