use of com.yahoo.jdisc.test.NonWorkingServerProvider in project vespa by vespa-engine.
the class ActiveContainerTestCase method requireThatServerAccessorWorks.
@Test
public void requireThatServerAccessorWorks() {
TestDriver driver = TestDriver.newSimpleApplicationInstanceWithoutOsgi();
ContainerBuilder builder = driver.newContainerBuilder();
ServerProvider foo = new NonWorkingServerProvider();
builder.serverProviders().install(foo);
ServerProvider bar = new NonWorkingServerProvider();
builder.serverProviders().install(bar);
ActiveContainer container = new ActiveContainer(builder);
Iterator<ServerProvider> it = container.serverProviders().iterator();
assertTrue(it.hasNext());
assertSame(foo, it.next());
assertTrue(it.hasNext());
assertSame(bar, it.next());
assertFalse(it.hasNext());
driver.close();
}
Aggregations