add test for getLength()