public boolean destroy() {
        if (!destroyed.getAndSet(true)) {
            if (net != null) {
                log.log(Level.INFO, "Destroy testServer '"+net.getIdentity().getServicePrefix()+"' at "+net.getConnectionSpec());
            } else {
                log.log(Level.INFO, "Destroy testServer without network");
            }
            mb.destroy();
            if (net != null)
                net.destroy();
            return true;
        }
        return false;
    }
Sets the destroyed flag to true. The very first time this method is called, it cleans up all its dependencies.
Even if you retain a reference to this object, all of its content is allowed to be garbage collected.

@return true if content existed and was destroyed
messagebus/src/main/java/com/yahoo/messagebus/network/rpc/test/TestServer.java