Add random options & some test cases

Signed-off-by: Michael Steinert <mike.steinert@gmail.com>