### Question:
ServiceConfig extends AbstractServiceConfig { public void setGeneric(String generic) { if (StringUtils.isEmpty(generic)) { return; } if (ProtocolUtils.isGeneric(generic)) { this.generic = generic; } else { throw new IllegalArgumentException("Unsupported generic type " + generic); } } ServiceConfig();  ServiceConfig(Service service); URL toUrl(); List<URL> toUrls(); @Parameter(excluded = true) boolean isExported(); @Parameter(excluded = true) boolean isUnexported(); void checkAndUpdateSubConfigs(); synchronized void export(); synchronized void unexport(); Class<?> getInterfaceClass(); void setInterfaceClass(Class<?> interfaceClass); String getInterface(); void setInterface(Class<?> interfaceClass); void setInterface(String interfaceName); T getRef(); void setRef(T ref); @Parameter(excluded = true) String getPath(); void setPath(String path); List<MethodConfig> getMethods(); @SuppressWarnings("unchecked") void setMethods(List<? extends MethodConfig> methods); ProviderConfig getProvider(); void setProvider(ProviderConfig provider); @Parameter(excluded = true) String getProviderIds(); void setProviderIds(String providerIds); String getGeneric(); void setGeneric(String generic); @Override void setMock(Boolean mock); @Override void setMock(String mock); List<URL> getExportedUrls(); @Deprecated List<ProviderConfig> getProviders(); @Deprecated void setProviders(List<ProviderConfig> providers); @Parameter(excluded = true) String getUniqueServiceName(); @Override @Parameter(excluded = true) String getPrefix();  }### Answer:
@Test public void testGeneric2() throws Exception { Assertions.assertThrows(IllegalArgumentException.class, () -> { ServiceConfig service = new ServiceConfig(); service.setGeneric("illegal"); }); }