Source:
<code>public void implementationMustOverrideMethods() throws IOException { final XnioWorker xnioWorker = new XnioWorker(Xnio.getInstance(), Thread.currentThread().getThreadGroup(), OptionMap.EMPTY, new Runnable() {public void run() {}}) { @Override public void shutdown() @Override public List<Runnable> shutdownNow() {return null;} @Override public boolean isShutdown() {return false;} @Override public boolean isTerminated() {return false;} @Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return false; } @Override public void awaitTermination() throws InterruptedException { } @Override public XnioIoThread getIoThread(final int hashCode) { return new XnioIoThreadMock(this); } @Override public int getIoThreadCount() { return 0; } @Override protected XnioIoThread chooseThread() { return new XnioIoThreadMock(this); } @Override <START> public XnioWorkerMXBean getMetrics() { <END> return null; } @Override protected Closeable registerServerMetrics(XnioServerMXBean metrics) { return null; } }; UnsupportedOperationException expected = null; try { xnioWorker.createStreamConnectionServer(new InetSocketAddress(1000), null, null); } catch (UnsupportedOperationException e) { expected = e; } assertNotNull(expected); expected = null; try { xnioWorker.createStreamConnectionServer(new LocalSocketAddress("server"), null, null); } catch (UnsupportedOperationException e) { expected = e; } assertNotNull(expected); expected = null; try { xnioWorker.createUdpServer(null, null); } catch (UnsupportedOperationException e) { expected = e; } assertNotNull(expected); }</code><technical_language>getMXBean()</technical_language>

Target:
public void implementationMustOverrideMethods() throws IOException { final XnioWorker xnioWorker = new XnioWorker(Xnio.getInstance(), Thread.currentThread().getThreadGroup(), OptionMap.EMPTY, new Runnable() {public void run() {}}) { @Override public void shutdown() @Override public List<Runnable> shutdownNow() {return null;} @Override public boolean isShutdown() {return false;} @Override public boolean isTerminated() {return false;} @Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return false; } @Override public void awaitTermination() throws InterruptedException { } @Override public XnioIoThread getIoThread(final int hashCode) { return new XnioIoThreadMock(this); } @Override public int getIoThreadCount() { return 0; } @Override protected XnioIoThread chooseThread() { return new XnioIoThreadMock(this); } @Override public XnioWorkerMXBean getMXBean() { return null; } @Override protected ManagementRegistration registerServerMXBean(XnioServerMXBean metrics) { return null; } }; UnsupportedOperationException expected = null; try { xnioWorker.createStreamConnectionServer(new InetSocketAddress(1000), null, null); } catch (UnsupportedOperationException e) { expected = e; } assertNotNull(expected); expected = null; try { xnioWorker.createStreamConnectionServer(new LocalSocketAddress("server"), null, null); } catch (UnsupportedOperationException e) { expected = e; } assertNotNull(expected); expected = null; try { xnioWorker.createUdpServer(null, null); } catch (UnsupportedOperationException e) { expected = e; } assertNotNull(expected); }