Using Random Values in Tests

Tests using jDummy are repeatable. Though jDummy uses Random to generate numeric results, it seeds the generator with a constant so the same values are generated every run.

You could explicitly specify all numeric values. You would still get the benefit of auto-generation of of intermediate objects:

   precondition(order.getLineItems()[i])
       .method("price").will(returnValue(49.99));
   ...

But having done that, what have you really gained? Is it germane that the price is 49.99? Do you even care if the price is negative? It probably won't affect the test. If is a requirement that the code checks for negative prices, then you should state that as a precondition for test cases that assume it is positive:

   precondition(order.getLineItems()[i]) 
        .method("price").will(returnValue(positiveDouble()));   

Non-numeric values are not random; they are predictable sequences. What we are talking about here are String values and the names of auto-generated dummies. The values generated are pretty close to what you might use with plain jMock:

 mimicWithDummyValues(User.class).getEmployer().getName() --> "dummyUser-1.employer-name"
 mimicWithDummyValues(Order.class, "newOrder").getItem(i).describe() 
        --> "newOrder.item-2.describe"