trq-2318 added unit testing for rm.c