partial experimental rewrite of ManagedRepositoryTest