replay();
AssetFactory factory = new ContextAssetFactory(request, context, optimizer);
Asset asset = factory.createAsset(r);
assertSame(asset.getResource(), r);
assertEquals(asset.toClientURL(), "/opt/path1");
// In real life, toString() is the same as toClientURL(), but we're testing
// that the optimize method is getting called, basically.
assertEquals(asset.toString(), "/opt/path2");
verify();
}