fix broken tests by adding various missing endof methods.