ExcludeRouter extends Router { @Override public List<ProviderInfo> route(SofaRequest request, List<ProviderInfo> providerInfos) { throw new UnsupportedOperationException(); } ExcludeRouter(String excludeName); String getExcludeName(); @Override List<ProviderInfo> route(SofaRequest request, List<ProviderInfo> providerInfos);  }
@Test public void invoke() throws Exception { boolean error = false; try { new ExcludeRouter("*").route(null, null); } catch (Exception e) { error = e instanceof UnsupportedOperationException; } Assert.assertTrue(error); }