@Test
public void cdnResources() {
WebApplication application = tester().getApplication();
application.getResourceSettings().setCachingStrategy(new NoOpResourceCachingStrategy());
IBootstrapSettings settings = Bootstrap.getSettings(application);
ResourceReference jsResourceReference = settings.getJsResourceReference();
CharSequence url = tester().getRequestCycle().urlFor(jsResourceReference, null);
Assert.assertThat(url.toString(), is(equalTo(
String.format("./wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/%s/js/bootstrap.js",
IBootstrapSettings.VERSION))));
settings.useCdnResources(true);
jsResourceReference = settings.getJsResourceReference();
CharSequence cdnUrl = tester().getRequestCycle().urlFor(jsResourceReference, null);
Assert.assertThat(cdnUrl.toString(), is(equalTo(String.format(IBootstrapSettings.JS_CDN_PATTERN, settings.getVersion()))));
}