public IPageLinkGenerator linkGenerator(Page pageInstance, Collection<? extends Class<? extends Page>> expectedClasses) {
return linkGenerator(PageModel.of(pageInstance), expectedClasses);
}
public IPageLinkGenerator linkGenerator(IModel<? extends Page> pageInstanceModel,
Collection<? extends Class<? extends Page>> expectedClasses) {
<BUG>IPageInstanceState<?> builder = builder().pageInstance(pageInstanceModel);
</BUG>
for (Class<? extends Page> expectedClass : expectedClasses) {
builder.validate(expectedClass);
}

public IPageLinkGenerator linkGenerator(Page pageInstance, Collection<? extends Class<? extends Page>> expectedClasses) {
return linkGenerator(PageModel.of(pageInstance), expectedClasses);
}
public IPageLinkGenerator linkGenerator(IModel<? extends Page> pageInstanceModel,
Collection<? extends Class<? extends Page>> expectedClasses) {
IPageInstanceState<?> builder = LinkDescriptorBuilder.start(pageInstanceModel);
for (Class<? extends Page> expectedClass : expectedClasses) {
builder.validate(expectedClass);
}
