Added tests and command for allocating NodeIDs.