Acts 5:41 The apostles left the Sanhedrin, rejoicing because they had been counted worthy of suffering disgrace for the Name.
After Jesus had told the disciples they would probably have to suffer because they were telling people the truth about God, they were prepared and got on with the task in hand.
When they were pulled in for telling people Jesus was the Messiah, they came out of their situation talking with each other and rejoicing about what they had been through.
Why? Because they knew they had reached people with the truth, they were rebelling and objecting about the truth being uncovered!