made unit test with randomized value generator and it tests every possible unit combination in a loop