Although removing the NotNull annotation makes the unit test pass, it is not a solution since in a production scenario the column wouldn’t be nullable.