Fix createRiver issue for unit test