TODO update.
Added tests for other rtypes as well that they are inserted/removed correctly.