public class VaadinServletConfigurationTest {
@Test
public void testEnclosingUIClass() throws Exception {
ServletInUI servlet = new MockUIContainingServlet.ServletInUI();
servlet.init(new MockServletConfig());
Class<? extends UI> uiClass = new DefaultUIProvider()
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
EasyMock.createMock(HttpServletRequest.class), servlet
.getService())));
Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}