### Question:
ServiceConfig extends AbstractServiceConfig { public void setInterface(String interfaceName) { this.interfaceName = interfaceName; if (id == null || id.length() == 0) { id = interfaceName; } } ServiceConfig();  ServiceConfig(Service service); URL toUrl(); List<URL> toUrls(); @Parameter(excluded = true) boolean isExported(); @Parameter(excluded = true) boolean isUnexported(); synchronized void export(); synchronized void unexport(); Class<?> getInterfaceClass(); void setInterfaceClass(Class<?> interfaceClass); String getInterface(); void setInterface(String interfaceName); void setInterface(Class<?> interfaceClass); 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); String getGeneric(); void setGeneric(String generic); List<URL> getExportedUrls(); @Deprecated List<ProviderConfig> getProviders(); @Deprecated void setProviders(List<ProviderConfig> providers); @Parameter(excluded = true) String getUniqueServiceName();  }### Answer:
@Test(expected = IllegalStateException.class) public void testInterface1() throws Exception { ServiceConfig<DemoService> service = new ServiceConfig<DemoService>(); service.setInterface(DemoServiceImpl.class); }