add test: gap detection