### Question:
SMAdaptor extends QBeanSupport implements SMAdaptorMBean { protected void stopService () throws Exception { NameRegistrar.unregister (getName ()); } SMAdaptor(); void setImpl(String clazz); String getImpl();  }### Answer:
@Test public void testStopService() throws Throwable { SMAdaptor sMAdaptor = new SMAdaptor(); sMAdaptor.setName("testSMAdaptorName"); sMAdaptor.stopService(); assertEquals("testSMAdaptorName", sMAdaptor.getName(), "sMAdaptor.getName()"); }