ClasspathAssetFactory factory = new ClasspathAssetFactory();
factory.setClassResolver(getClassResolver());
factory.setAssetService(assetService);
factory.setLocalizer(new DefaultResourceLocalizer());
IAsset asset = factory.createAbsoluteAsset(
"/org/apache/tapestry/asset/relative-resource.txt",
Locale.FRENCH,
l);
assertTrue(asset instanceof PrivateAsset);
assertEquals("/org/apache/tapestry/asset/relative-resource_fr.txt", asset
.getResourceLocation().getPath());
assertSame(l, asset.getLocation());
verify();
}