This will work, though I am not so keen on testing from randomly generated inputs simply because they are unpredictable (by nature).  In other words, the test could sometimes PASS and sometimes FAIL, if there are other conditions involved, it may make it difficult to tell why it FAILED sometimes.  Instead, it's probably fine to pick some static values, set them as configuration options, and call it "good enough".