Throw exception when repository isn't registered.
Use getter for name instead of property for better mocking.
More specs for Library and Repository class.