BS-8827, refactor and add test on what's is currently possible.