TEST: added toposort tests