JavaScriptBootstrapHandler extends BootstrapHandler { @Override protected boolean canHandleRequest(VaadinRequest request) { return HandlerHelper.isRequestType(request, RequestType.INIT); } JavaScriptBootstrapHandler(); @Override boolean synchronizedHandleRequest(VaadinSession session,
            VaadinRequest request, VaadinResponse response);  }
@Test public void should_handleRequest_when_initTypeRequest() throws Exception { VaadinRequest request = mocks.createRequest(mocks, "/foo/?v-r=init&foo"); Assert.assertTrue(jsInitHandler.canHandleRequest(request)); }
@Test public void should_not_handleRequest_if_not_initTypeRequest() throws Exception { VaadinRequest request = mocks.createRequest(mocks, "/foo/?v-r=bar"); Assert.assertFalse(jsInitHandler.canHandleRequest(request)); }