### Question:
ServiceOperations { public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } } private  ServiceOperations(); static void ensureCurrentState(Service.STATE state,
                                        Service.STATE expectedState); static void init(Service service, Configuration configuration); static void start(Service service); static void deploy(Service service, Configuration configuration); static void stop(Service service); static Exception stopQuietly(Service service);  }### Answer:
@Test public void testStopInit() throws Throwable { BreakableService svc = new BreakableService(); ServiceOperations.stop(svc); assertServiceStateCreated(svc); assertStateCount(svc, Service.STATE.STOPPED, 0); ServiceOperations.stop(svc); assertStateCount(svc, Service.STATE.STOPPED, 0); }