BS-11264 Add tests, and modified getElements and getChildren to return
empty table instead of null.