Fix mutator in GetRolesRequestTests
There was no guarantee that the mutated object would not be the same
as the original object (and was for seed 6A8C4CBF63B5AA63)
Resolves
@@ -47,6 +47,7 @@ public class GetRolesRequestTests extends ESTestCase {
}
private static GetRolesRequest mutateTestItem(GetRolesRequest original) {
- return new GetRolesRequest(randomArray(0, 5, String[]::new, () -> randomAlphaOfLength(5)));
+ final int minRoles = original.getRoleNames().isEmpty() ? 1 : 0;
+ return new GetRolesRequest(randomArray(minRoles, 5, String[]::new, () -> randomAlphaOfLength(6)));
}
}
