Use util method to get a random node (tests only)

Signed-off-by: nicoruti <nico.rutishauser@diligent-it.com>