if (repositories != null && repositories.length > 0)
{
final int numberOfRepositories = repositories.length;
for (int ctr = 0; ctr < numberOfRepositories; ctr++)
{
final Repository repository = repositories[ctr];
final Model[] models = repository.getModels();
if (models != null)
{
// - we just load only the first model (since it doesn't
// make sense
// to test with more than one model)
final Model model = models[0];
repositoriesContainer.loadModel(model);
final RepositoryFacade repositoryImplementation =
repositoriesContainer.getImplementation(repository.getName());
this.model = repositoryImplementation.getModel();
// - make sure the factory has access to the model
factory.setModel(this.model, model.getType());
}