Turn out to be just that the test was setting a property to null. Obviously calling equals on it was blowing up. I added more defensive code, just to make it more robust.