WritableRepository and more error tests