LogicalNodeManager implements Reportable { synchronized public void decommission(String name) throws IOException, InterruptedException { LogicalNode nd = threads.remove(name); if (nd == null) { throw new IOException("Attempting to decommission node '" + name + "' but it does not exist!"); } ReportManager.get().remove(nd); nd.close(); } LogicalNodeManager(String physicalNode); synchronized Collection<LogicalNode> getNodes(); synchronized void spawn(String name, String src, String snk); synchronized void testingSpawn(String name, String src, String snk); synchronized void decommission(String name); @Deprecated ReportEvent getReport(); @Override ReportEvent getMetrics(); @Override Map<String, Reportable> getSubMetrics(); String getPhysicalNodeName(); @Override String getName(); synchronized LogicalNode get(String ln); synchronized void decommissionAllBut(List<String> excludes);  }
@Test(expected = IOException.class) public void tesIllegalDecommission() throws IOException, InterruptedException { LogicalNodeManager lnm = new LogicalNodeManager("local"); lnm.decommission("nonexist"); }