Added spec for getting the number of the end of an id