### Question:
ProtocolConfig extends AbstractConfig { public void destroy() { if (name != null) { ExtensionLoader.getExtensionLoader(Protocol.class).getExtension(name).destroy(); } } ProtocolConfig();  ProtocolConfig(String name);  ProtocolConfig(String name, int port); @Parameter(excluded = true) String getName(); void setName(String name); @Parameter(excluded = true) String getHost(); void setHost(String host); @Parameter(excluded = true) Integer getPort(); void setPort(Integer port); @Deprecated @Parameter(excluded = true) String getPath(); @Deprecated void setPath(String path); @Parameter(excluded = true) String getContextpath(); void setContextpath(String contextpath); String getThreadpool(); void setThreadpool(String threadpool); Integer getThreads(); void setThreads(Integer threads); Integer getIothreads(); void setIothreads(Integer iothreads); Integer getQueues(); void setQueues(Integer queues); Integer getAccepts(); void setAccepts(Integer accepts); String getCodec(); void setCodec(String codec); String getSerialization(); void setSerialization(String serialization); String getCharset(); void setCharset(String charset); Integer getPayload(); void setPayload(Integer payload); Integer getBuffer(); void setBuffer(Integer buffer); Integer getHeartbeat(); void setHeartbeat(Integer heartbeat); String getServer(); void setServer(String server); String getClient(); void setClient(String client); String getAccesslog(); void setAccesslog(String accesslog); String getTelnet(); void setTelnet(String telnet); @Parameter(escaped = true) String getPrompt(); void setPrompt(String prompt); String getStatus(); void setStatus(String status); Boolean isRegister(); void setRegister(Boolean register); String getTransporter(); void setTransporter(String transporter); String getExchanger(); void setExchanger(String exchanger); @Deprecated @Parameter(excluded = true) String getDispather(); @Deprecated void setDispather(String dispather); String getDispatcher(); void setDispatcher(String dispatcher); String getNetworker(); void setNetworker(String networker); Map<String, String> getParameters(); void setParameters(Map<String, String> parameters); Boolean isDefault(); void setDefault(Boolean isDefault); Boolean getKeepAlive(); void setKeepAlive(Boolean keepAlive); String getOptimizer(); void setOptimizer(String optimizer); String getExtension(); void setExtension(String extension); void destroy(); @Deprecated static void destroyAll();  }### Answer:
@Test public void testDestroy() throws Exception { Protocol protocol = Mockito.mock(Protocol.class); MockProtocol2.delegate = protocol; ProtocolConfig protocolConfig = new ProtocolConfig(); protocolConfig.setName("mockprotocol2"); protocolConfig.destroy(); Mockito.verify(protocol).destroy(); }