Final spec and tests - edge cases OK