I also experienced this issue in a @DataJpaTest. I had a class that had an auto-generated ID like below.
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
private String id;
I was then setting this ID manually before calling .save(). After I stopped manually setting the ID before the save I no longer received this exception.