### Question:
NodeFencer { public boolean fence(HAServiceTarget fromSvc) { LOG.info("====== Beginning Service Fencing Process... ======"); int i = 0; for (FenceMethodWithArg method : methods) { LOG.info("Trying method " + (++i) + "/" + methods.size() +": " + method); try { if (method.method.tryFence(fromSvc, method.arg)) { LOG.info("====== Fencing successful by method " + method + " ======"); return true; } } catch (BadFencingConfigurationException e) { LOG.error("Fencing method " + method + " misconfigured", e); continue; } catch (Throwable t) { LOG.error("Fencing method " + method + " failed with an unexpected error.", t); continue; } LOG.warn("Fencing method " + method + " was unsuccessful."); } LOG.error("Unable to fence service by any configured method."); return false; } NodeFencer(Configuration conf, String spec); static NodeFencer create(Configuration conf, String confKey); boolean fence(HAServiceTarget fromSvc);  }### Answer:
@Test public void testShortNameShell() throws BadFencingConfigurationException { NodeFencer fencer = setupFencer("shell(true)"); assertTrue(fencer.fence(MOCK_TARGET)); }