Test getLength()