Using Pojo lesson "dateOfBirth=null"

This test fails can someone help me fix this bug, I run the debugger I tried to parse the date, and it still not working.

Test testReadObjectWithCustomFieldCodec()

Expected :Sun Jun 22 00:00:00 BST 1958
Actual :null

have same error - is there any solution?

Same error here in this assert:
Assert.assertEquals(mappedActor.getDateOfBirth(), stringIdActor.getDateOfBirth());

Hi @marcelmfa,

Please let me know if you are still facing the issue. If yes, please share the Lab and error details from your console.


[ERROR] Failures:
[ERROR] UsingPojoLesson.testReadObjectWithCustomFieldCodec:412 expected:<Sun Jun 22 00:00:00 BRT 1958> but was:

I followed instructions on video and my changes were add @BsonProperty on ActorBasic class. Nothing else.

I reviewed both videos from Pojo’s and were missing add @BsonProperty on ActorWithStringId too. Now is running fine.

1 Like